diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-16 16:25:11 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-16 16:25:11 -0300 |
commit | f5e55be2a0ce64066c1b0554675633b92c91fafb (patch) | |
tree | ef50204da94f49c8f788aad5f94557ed873b1fb6 /testes | |
parent | 9f0c0fe0de64bc41efea73a2da881ff0a1036a03 (diff) | |
download | lua-v5.4.tar.gz lua-v5.4.tar.bz2 lua-v5.4.zip |
Bug: Missing error status in panic functionv5.4
'luaD_throw' may call 'luaE_resetthread', which returns an error code
but clears 'L->status'; so, 'luaD_throw' should set that status again.
Diffstat (limited to 'testes')
-rw-r--r-- | testes/api.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testes/api.lua b/testes/api.lua index 752ff18f..eab3059b 100644 --- a/testes/api.lua +++ b/testes/api.lua | |||
@@ -399,6 +399,10 @@ do | |||
399 | -- trivial error | 399 | -- trivial error |
400 | assert(T.checkpanic("pushstring hi; error") == "hi") | 400 | assert(T.checkpanic("pushstring hi; error") == "hi") |
401 | 401 | ||
402 | -- thread status inside panic (bug in 5.4.4) | ||
403 | assert(T.checkpanic("pushstring hi; error", "threadstatus; return 2") == | ||
404 | "ERRRUN") | ||
405 | |||
402 | -- using the stack inside panic | 406 | -- using the stack inside panic |
403 | assert(T.checkpanic("pushstring hi; error;", | 407 | assert(T.checkpanic("pushstring hi; error;", |
404 | [[checkstack 5 XX | 408 | [[checkstack 5 XX |