* NEWS: Bison-generated parsers no longer default to using the

alloca function (when available) to extend the parser stack, due
to widespread problems in unchecked stack-overflow detection.
* data/glr.c (YYMAXDEPTH): Remove undef when zero.  It's the user's
responsibility to set it to a positive value.  This lets the user
specify a value that is not a preprocessor constant.
* data/yacc.c (YYMAXDEPTH): Likewise.
(YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
* doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
to be a compile-time constant.  However, explain the constraints on it.
Also, explain the constraints on YYINITDEPTH.
(Table of Symbols): Explain that alloca is no longer the default.
Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
to 1.
This commit is contained in:
Paul Eggert
2004-12-22 21:19:47 +00:00
parent 0a2c51373a
commit d7e14fc000
5 changed files with 54 additions and 21 deletions

6
NEWS
View File

@@ -3,6 +3,12 @@ Bison News
Changes in version 1.875f:
* Bison-generated parsers no longer default to using the alloca function
(when available) to extend the parser stack, due to widespread
problems in unchecked stack-overflow detection. You can "#define
YYSTACK_USE_ALLOCA 1" to use alloca anyway, but please read the
manual to determine safe values for YYMAXDEPTH in that case.
Changes in version 1.875e, 2004-12-10:
* New directive: %initial-action.