mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
* src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
use alloca when we didn't want to, and vice versa.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2001-11-27 Paul Eggert <eggert@twinsun.com>
|
||||||
|
|
||||||
|
* src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
|
||||||
|
use alloca when we didn't want to, and vice versa.
|
||||||
|
|
||||||
2001-11-27 Akim Demaille <akim@epita.fr>
|
2001-11-27 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* tests/torture.at (Exploding the Stack Size with Malloc):
|
* tests/torture.at (Exploding the Stack Size with Malloc):
|
||||||
|
|||||||
@@ -80,6 +80,14 @@
|
|||||||
If WHAT was malloc'ed (not the original automatic ARRAY), free it. */
|
If WHAT was malloc'ed (not the original automatic ARRAY), free it. */
|
||||||
#if YYSTACK_USE_ALLOCA
|
#if YYSTACK_USE_ALLOCA
|
||||||
# define YYSTACK_REALLOC(Type, What, Array) \
|
# define YYSTACK_REALLOC(Type, What, Array) \
|
||||||
|
do { \
|
||||||
|
Type *old = What; \
|
||||||
|
What = (Type *) alloca (yystacksize * sizeof (Type)); \
|
||||||
|
__yy_memcpy ((char *) What, (char *) old, \
|
||||||
|
(size) * (unsigned int) sizeof (Type)); \
|
||||||
|
} while (0)
|
||||||
|
#else
|
||||||
|
# define YYSTACK_REALLOC(Type, What, Array) \
|
||||||
do { \
|
do { \
|
||||||
Type *old = What; \
|
Type *old = What; \
|
||||||
What = (Type *) malloc (yystacksize * sizeof (Type)); \
|
What = (Type *) malloc (yystacksize * sizeof (Type)); \
|
||||||
@@ -89,14 +97,6 @@ do { \
|
|||||||
if (old != Array) \
|
if (old != Array) \
|
||||||
free (old); \
|
free (old); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
|
||||||
# define YYSTACK_REALLOC(Type, What, Array) \
|
|
||||||
do { \
|
|
||||||
Type *old = What; \
|
|
||||||
What = (Type *) alloca (yystacksize * sizeof (Type)); \
|
|
||||||
__yy_memcpy ((char *) What, (char *) old, \
|
|
||||||
(size) * (unsigned int) sizeof (Type)); \
|
|
||||||
} while (0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define yyerrok (yyerrstatus = 0)
|
#define yyerrok (yyerrstatus = 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user