[Tarantool-patches] [PATCH v2 luajit 25/30] test: disable PUC Lua error test for syntax level
Igor Munkin
imun at tarantool.org
Wed Mar 31 22:24:05 MSK 2021
Sergey,
Thanks for the patch! LGTM, except the nits below.
On 26.03.21, Sergey Kaplun wrote:
> 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 patch disabled test expected the LJ_ERR_XLEVEL error, but
Typo: s/disabled test/disables the test/.
> failing with the LJ_ERR_XSLOTS error.
>
> Part of tarantool/tarantool#5845
> Part of tarantool/tarantool#4473
> ---
> test/PUC-Lua-5.1-tests/errors.lua | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/test/PUC-Lua-5.1-tests/errors.lua b/test/PUC-Lua-5.1-tests/errors.lua
> index 028224c..328976e 100644
> --- a/test/PUC-Lua-5.1-tests/errors.lua
> +++ b/test/PUC-Lua-5.1-tests/errors.lua
> @@ -228,7 +228,13 @@ 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.
Side note: It would be nice if you also mention the root cause. AFAIU,
LuaJIT frontend checks "virtual" stack size at the translation time,
right? Therefore, when GC64 support is enabled every 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
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list