From: Paul Eggert Date: Mon, 18 Jul 2005 06:14:16 +0000 (+0000) Subject: * tests/conflicts.at (%nonassoc and eof): Don't exit with status X-Git-Tag: BISON-2_1~84 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/67fd79c42743952d58ca53e3a97a8b66ee31bcc6 * tests/conflicts.at (%nonassoc and eof): Don't exit with status 1 on syntax error; just let yyparse do its thing. * tests/glr-regression.at (Badly Collapsed GLR States): Likewise. * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise. (Exploding the Stack Size with Alloca): (Exploding the Stack Size with Malloc): Expect exit status 2, not 1, since the parser is supposed to blow its stack. Problem reported by twlevo@xs4all.nl. --- diff --git a/ChangeLog b/ChangeLog index 1bb4543a..0f8d338d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2005-07-17 Paul Eggert + * tests/conflicts.at (%nonassoc and eof): Don't exit with status + 1 on syntax error; just let yyparse do its thing. + * tests/glr-regression.at (Badly Collapsed GLR States): Likewise. + * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise. + (Exploding the Stack Size with Alloca): + (Exploding the Stack Size with Malloc): + Expect exit status 2, not 1, since the parser is supposed to blow + its stack. Problem reported by twlevo@xs4all.nl. + * data/glr.c (yyparse): Don't assume that the initial calls to YYMALLOC succeed; in that case, yyparse incorrectly returned 0. Print a stack-overflow message and fail instead. diff --git a/tests/conflicts.at b/tests/conflicts.at index 475c7a7c..9b503b63 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -1,6 +1,6 @@ # Exercising Bison on conflicts. -*- Autotest -*- -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -62,7 +62,6 @@ static void yyerror (const char *msg) { fprintf (stderr, "%s\n", msg); - exit (1); } /* The current argument. */ diff --git a/tests/glr-regression.at b/tests/glr-regression.at index dfe4b73c..bcb7773b 100644 --- a/tests/glr-regression.at +++ b/tests/glr-regression.at @@ -74,7 +74,6 @@ int yyerror (char const *msg) { fprintf (stderr, "%s\n", msg); - exit (4); } diff --git a/tests/torture.at b/tests/torture.at index df20a346..af5019bc 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -404,7 +404,6 @@ static void yyerror (const char *msg) { fprintf (stderr, "%s\n", msg); - exit (1); } /* There are YYLVAL_MAX of WAIT_FOR_EOFs. */ @@ -452,7 +451,7 @@ AT_PARSER_CHECK([./input 20], 0, [], [ignore]) AT_PARSER_CHECK([./input 900], 0, [], [ignore]) # Fails: beyond the limit of 10,000 (which we don't reach anyway since we # multiply by two starting at 200 => 5120 is the last possible). -AT_PARSER_CHECK([./input 10000], 1, [], [ignore]) +AT_PARSER_CHECK([./input 10000], 2, [], [ignore]) AT_CLEANUP @@ -473,6 +472,6 @@ AT_PARSER_CHECK([./input 20], 0, [], [ignore]) AT_PARSER_CHECK([./input 900], 0, [], [ignore]) # Fails: beyond the limit of 10,000 (which we don't reach anyway since we # multiply by two starting at 200 => 5120 is the possible). -AT_PARSER_CHECK([./input 10000], 1, [], [ignore]) +AT_PARSER_CHECK([./input 10000], 2, [], [ignore]) AT_CLEANUP