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:
@@ -107,7 +107,7 @@ function filter (p, g)
|
||||
end)
|
||||
end
|
||||
|
||||
local x = gen(100)
|
||||
local x = gen(80)
|
||||
local a = {}
|
||||
while 1 do
|
||||
local n = x()
|
||||
@@ -116,7 +116,7 @@ while 1 do
|
||||
x = filter(n, x)
|
||||
end
|
||||
|
||||
assert(#a == 25 and a[#a] == 97)
|
||||
assert(#a == 22 and a[#a] == 79)
|
||||
x, a = nil
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user