mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
locals. Reported by Juan Manuel Guerrero at <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>. * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if. Fix some indentation also. * tests/torture.at (Exploding the Stack Size with Alloca): Add comment explaining this issue.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
||||
2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||
|
||||
Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
|
||||
locals. Reported by Juan Manuel Guerrero at
|
||||
<http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
|
||||
* data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
|
||||
Fix some indentation also.
|
||||
* tests/torture.at (Exploding the Stack Size with Alloca): Add comment
|
||||
explaining this issue.
|
||||
|
||||
2007-01-09 Paolo Bonzini <bonzini@gnu.org>
|
||||
and Joel E. Denny <jdenny@ces.clemson.edu>
|
||||
|
||||
|
||||
@@ -332,7 +332,8 @@ typedef short int yytype_int16;
|
||||
|
||||
#if ! defined yyoverflow || YYERROR_VERBOSE
|
||||
|
||||
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||
]b4_push_if([],
|
||||
[[/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||
|
||||
# ifdef YYSTACK_USE_ALLOCA
|
||||
# if YYSTACK_USE_ALLOCA
|
||||
@@ -357,7 +358,8 @@ typedef short int yytype_int16;
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef YYSTACK_ALLOC
|
||||
]])dnl
|
||||
[# ifdef YYSTACK_ALLOC
|
||||
/* Pacify GCC's `empty if-body' warning. */
|
||||
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
|
||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||
|
||||
@@ -490,6 +490,9 @@ AT_PARSER_CHECK([./input 900], 0, [], [ignore])
|
||||
# multiply by two starting at 200 => 5120 is the last possible).
|
||||
AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
|
||||
|
||||
# The push parser can't use alloca since the stacks can't be locals. This test
|
||||
# just helps guarantee we don't let the YYSTACK_USE_ALLOCA feature affect
|
||||
# push parsers.
|
||||
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
|
||||
[[%push-pull-parser
|
||||
]])
|
||||
|
||||
Reference in New Issue
Block a user