summaryrefslogtreecommitdiff
path: root/testes/calls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/calls.lua')
-rw-r--r--testes/calls.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/testes/calls.lua b/testes/calls.lua
index ff72d8f6..ee8cce73 100644
--- a/testes/calls.lua
+++ b/testes/calls.lua
@@ -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