X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d88cf117910f0023d3a0f53c2380aec40a748c3d..ea6046b9f6f8ab16f2f0f03a0d15499243971ae2:/tests/regression.at diff --git a/tests/regression.at b/tests/regression.at index 01a60c89..544565ad 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -1,7 +1,7 @@ # Bison Regressions. -*- Autotest -*- -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +# 2010 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 @@ -1358,16 +1358,13 @@ AT_CLEANUP # Imagine the case where YYSTACK_ALLOC_MAXIMUM = YYSIZE_MAXIMUM and an # invocation of yysyntax_error has caused yymsg_alloc to grow to exactly # YYSTACK_ALLOC_MAXIMUM (perhaps because the normal doubling of size had -# to be clipped to YYSTACK_ALLOC_MAXIMUM). Now imagine a subsequent -# invocation of yysyntax_error that overflows during its size -# calculation and thus returns YYSIZE_MAXIMUM to yyparse. Then, yyparse -# will invoke yyerror using the old contents of yymsg. This bug needs -# to be fixed. +# to be clipped to YYSTACK_ALLOC_MAXIMUM). In an old version of yacc.c, +# a subsequent invocation of yysyntax_error that overflows during its +# size calculation would return YYSIZE_MAXIMUM to yyparse. Then, +# yyparse would invoke yyerror using the old contents of yymsg. AT_SETUP([[%error-verbose overflow]]) -AT_XFAIL_IF([[:]]) - AT_DATA_GRAMMAR([input.y], [[%code { #include @@ -1378,9 +1375,12 @@ AT_DATA_GRAMMAR([input.y], large enough to overflow size_t. */ #define YYSIZE_T unsigned char - /* Bring in malloc so yacc.c doesn't try to provide a malloc prototype - using our YYSIZE_T. */ + /* Bring in malloc and set EXIT_SUCCESS so yacc.c doesn't try to + provide a malloc prototype using our YYSIZE_T. */ #include + #ifndef EXIT_SUCCESS + # define EXIT_SUCCESS 0 + #endif /* Max depth is usually much smaller than YYSTACK_ALLOC_MAXIMUM, and we don't want gcc to warn everywhere this constant would be too big