diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-05-26 15:14:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-05-26 15:14:54 -0300 |
commit | d61b0c60287c38008d312ddd11724a15b1737f7b (patch) | |
tree | cbba214daaf712ac78547d136aa24b12d1308294 /testes | |
parent | 196bb94d66e727e0aec053a0276c3ad701500762 (diff) | |
download | lua-d61b0c60287c38008d312ddd11724a15b1737f7b.tar.gz lua-d61b0c60287c38008d312ddd11724a15b1737f7b.tar.bz2 lua-d61b0c60287c38008d312ddd11724a15b1737f7b.zip |
More checks and documentation for uses of EXTRA_STACK
Diffstat (limited to '')
-rw-r--r-- | testes/calls.lua | 10 |
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 | |||
151 | end | 151 | end |
152 | 152 | ||
153 | 153 | ||
154 | do -- C-stack overflow while handling C-stack overflow | ||
155 | local function loop () | ||
156 | assert(pcall(loop)) | ||
157 | end | ||
158 | |||
159 | local err, msg = xpcall(loop, loop) | ||
160 | assert(not err and string.find(msg, "error")) | ||
161 | end | ||
162 | |||
163 | |||
154 | 164 | ||
155 | do -- tail calls x chain of __call | 165 | do -- tail calls x chain of __call |
156 | local n = 10000 -- depth | 166 | local n = 10000 -- depth |