Changes in the control of C-stack overflow
* unification of the 'nny' and 'nCcalls' counters;
* external C functions ('lua_CFunction') count more "slots" in
the C stack (to allow for their possible use of buffers)
* added a new test script specific for C-stack overflows. (Most
of those tests were already present, but concentrating them
in a single script easies the task of checking whether
'LUAI_MAXCCALLS' is adequate in a system.)
This commit is contained in:
@@ -367,10 +367,12 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {
|
||||
}
|
||||
|
||||
|
||||
#define enterlevel(ls) luaE_incCcalls((ls)->L)
|
||||
/*
|
||||
** Macros to limit the maximum recursion depth while parsing
|
||||
*/
|
||||
#define enterlevel(ls) luaE_enterCcall((ls)->L)
|
||||
|
||||
|
||||
#define leavelevel(ls) ((ls)->L->nCcalls--)
|
||||
#define leavelevel(ls) luaE_exitCcall((ls)->L)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user