More checks and documentation for uses of EXTRA_STACK

This commit is contained in:
Roberto Ierusalimschy
2022-05-26 15:14:54 -03:00
parent 196bb94d66
commit d61b0c6028
5 changed files with 47 additions and 13 deletions

View File

@@ -151,6 +151,16 @@ do -- tail calls x varargs
end
do -- C-stack overflow while handling C-stack overflow
local function loop ()
assert(pcall(loop))
end
local err, msg = xpcall(loop, loop)
assert(not err and string.find(msg, "error"))
end
do -- tail calls x chain of __call
local n = 10000 -- depth