[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test 145 failure
From: |
Joel E. Denny |
Subject: |
Re: test 145 failure |
Date: |
Fri, 12 Jan 2007 17:21:46 -0500 (EST) |
Another ignored message.
On Tue, 9 Jan 2007, Joel E. Denny wrote:
> On Tue, 9 Jan 2007, Joel E. Denny wrote:
>
> > The problem is that push parsers can't use alloca since the stacks can't
> > be locals. I'll commit a patch soon to prevent push parsers from paying
> > attention to YYSTACK_USE_ALLOCA.
>
> I committed the following.
>
> I hope I haven't missed any messages in this thread. The mailing list is
> slow again.
>
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/bison/bison/ChangeLog,v
> retrieving revision 1.1657
> diff -p -u -r1.1657 ChangeLog
> --- ChangeLog 9 Jan 2007 05:32:14 -0000 1.1657
> +++ ChangeLog 10 Jan 2007 00:44:45 -0000
> @@ -1,3 +1,13 @@
> +2007-01-09 Joel E. Denny <address@hidden>
> +
> + 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 <address@hidden>
> and Joel E. Denny <address@hidden>
>
> Index: data/push.c
> ===================================================================
> RCS file: /sources/bison/bison/data/push.c,v
> retrieving revision 1.34
> diff -p -u -r1.34 push.c
> --- data/push.c 9 Jan 2007 05:24:11 -0000 1.34
> +++ data/push.c 10 Jan 2007 00:44:45 -0000
> @@ -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
> @@ -1089,13 +1091,13 @@ b4_push_if(
> ]b4_locations_if([[ YYLTYPE yylloc;
> ]])])[
> if (yyps == 0)
> - yyps_local = yypstate_new ();
> - else
> - yyps_local = yyps;
> - do {
> - yychar = YYLEX;
> - yystatus =
> - yypush_parse (yyps_local]b4_pure_if([[, yychar,
> &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [,
> b4_c_args(b4_parse_param)])[);
> + yyps_local = yypstate_new ();
> + else
> + yyps_local = yyps;
> + do {
> + yychar = YYLEX;
> + yystatus =
> + yypush_parse (yyps_local]b4_pure_if([[, yychar,
> &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [,
> b4_c_args(b4_parse_param)])[);
> } while (yystatus == YYPUSH_MORE);
> if (yyps == 0)
> yypstate_delete (yyps_local);
> @@ -1149,8 +1151,8 @@ b4_c_function_def([yyparse], [int], [[vo
> b4_c_function_def([yyparse], [int], b4_parse_param)
> #endif])[
> {
> - ]b4_pure_if([b4_declare_scanner_communication_variables])
> - b4_push_if([b4_pure_if([], [[ int yypushed_char = yychar;
> +]b4_pure_if([b4_declare_scanner_communication_variables])
> +b4_push_if([b4_pure_if([], [[ int yypushed_char = yychar;
> YYSTYPE yypushed_val = yylval;
> ]b4_locations_if([[YYLTYPE yypushed_loc = yylloc;
> ]])])],
> Index: tests/torture.at
> ===================================================================
> RCS file: /sources/bison/bison/tests/torture.at,v
> retrieving revision 1.34
> diff -p -u -r1.34 torture.at
> --- tests/torture.at 1 Jan 2007 00:42:21 -0000 1.34
> +++ tests/torture.at 10 Jan 2007 00:44:47 -0000
> @@ -490,6 +490,9 @@ AT_PARSER_CHECK([./input 900], 0, [], [i
> # 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
> ]])
>