[Tarantool-patches] [PATCH luajit v3 24/29] test: disable PUC-Rio test for syntax level error
Sergey Kaplun
skaplun at tarantool.org
Tue Apr 13 16:27:24 MSK 2021
When LuaJIT is compiled with LUAJIT_ENABLE_GC64, LJ_MAX_SLOTS limit is
reached and error LJ_ERR_XSLOTS ("function or expression too complex")
is raised earlier, than LJ_MAX_XLEVEL limit is reached and error
LJ_ERR_XLEVELS ("chunk has too many syntax levels") is raised.
This happens, because, when GC64 support is enabled, every
function's call needs twice more slots on the coroutine stack
(since LJ_FR2 is also set).
This patch disabled the test expecting the LJ_ERR_XLEVEL error, but
failing with the LJ_ERR_XSLOTS error.
Part of tarantool/tarantool#5845
Part of tarantool/tarantool#4473
---
test/PUC-Rio-Lua-5.1-tests/errors.lua | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test/PUC-Rio-Lua-5.1-tests/errors.lua b/test/PUC-Rio-Lua-5.1-tests/errors.lua
index ee07e14d..440f68cd 100644
--- a/test/PUC-Rio-Lua-5.1-tests/errors.lua
+++ b/test/PUC-Rio-Lua-5.1-tests/errors.lua
@@ -232,7 +232,16 @@ local function testrep (init, rep)
end
testrep("a=", "{")
testrep("a=", "(")
-testrep("", "a(")
+-- LuaJIT: When compiled with LUAJIT_ENABLE_GC64, LJ_MAX_SLOTS
+-- limit is reached and error LJ_ERR_XSLOTS ("function or
+-- expression too complex") is raised earlier, than LJ_MAX_XLEVEL
+-- limit is reached and error LJ_ERR_XLEVELS ("chunk has too many
+-- syntax levels") is raised.
+-- This happens, because, when GC64 support is enabled, every
+-- function's call needs twice more slots on the coroutine stack
+-- (since LJ_FR2 is also set).
+-- Test is disabled for LuaJIT.
+-- testrep("", "a(")
testrep("", "do ")
testrep("", "while a do ")
testrep("", "if a then else ")
--
2.31.0
More information about the Tarantool-patches
mailing list