Commit 468b85d9 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

restrict parser stack size to avoid thread stack overflow in

bison-generated parsers
parent a8277d18
......@@ -16,7 +16,7 @@
* SOFTWARE.
*/
/* $Id: confparser.y,v 1.66 2000/04/18 00:25:40 gson Exp $ */
/* $Id: confparser.y,v 1.67 2000/04/19 00:26:39 gson Exp $ */
#include <config.h>
......@@ -100,6 +100,18 @@ static isc_lexspecials_t specials;
#define YYDEBUG 1
/*
* Specify a small parser stack size. This is needed when
* using bison the generate the parser, because it puts
* the parser stack in a local variable, and the default
* initial stack size of 200 is big enough to cause a
* thread stack overflow. Berkeley yacc does not suffer
* from this problem as it allocates the parser stack
* using malloc.
*/
#define YYMAXDEPTH 20
#define YYINITDEPTH 20
static isc_result_t tmpres;
static int debug_lexer;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment