[Tarantool-patches] [PATCH luajit v3 22/29] test: disable PUC-Rio test for fast function name
Sergey Kaplun
skaplun at tarantool.org
Tue Apr 13 16:27:22 MSK 2021
When LuaJIT tries to detect function's name for error message, it
determines the bytecode position first, via `debug_framepc()`. For
tailcall there is no creation of additional Lua frame, so the current
frame is a C protected frame (at the moment of the error throwing).
`debug_framepc()` can't determine bytecode position for non-Lua frames,
so the fast function name is not detected.
This patch disables the test that checks the name of built-in functions
reported in error in tail call.
Part of tarantool/tarantool#5845
Part of tarantool/tarantool#4473
---
test/PUC-Rio-Lua-5.1-tests/errors.lua | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/test/PUC-Rio-Lua-5.1-tests/errors.lua b/test/PUC-Rio-Lua-5.1-tests/errors.lua
index c9d79279..1cc01564 100644
--- a/test/PUC-Rio-Lua-5.1-tests/errors.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/errors.lua
@@ -105,9 +105,17 @@ while 1 do
insert(prefix, a)
end]], "global 'insert'")
-checkmessage([[ -- tail call
- return math.sin("a")
-]], "'sin'")
+-- LuaJIT: When LuaJIT tries to detect function's name for error
+-- message, it determines the bytecode position first, via
+-- `debug_framepc()`. For tailcall there is no creation of
+-- additional Lua frame, so the current frame is a C protected
+-- frame (at the moment of the error throwing). `debug_framepc()`
+-- can't determine bytecode position for non-Lua frames, so
+-- the fast function name is not detected.
+-- The test is disabled for LuaJIT.
+-- checkmessage([[ -- tail call
+-- return math.sin("a")
+-- ]], "'sin'")
checkmessage([[collectgarbage("nooption")]], "invalid option")
--
2.31.0
More information about the Tarantool-patches
mailing list