Skip to content

Commit

Permalink
test: off JIT for routines in <lang/stackov.lua>
Browse files Browse the repository at this point in the history
This patch is a follow-up to the commit
6a3a97c ("test: enable
<misc/stackovc.lua> LuaJIT test"). The enabled test may raise an error
for the specific builds (see [1], for example) when the stack overflow
error is raised on the trace exit during the restoration from the
snapshot. In that case, LuaJIT VM can't restore the full traceback, and
the corresponding check in the test is failed.

This patch disables JIT for these functions with recursive calls to
avoid such failures.

[1]: https://github.com/tarantool/luajit/actions/runs/10717386746

Follows up tarantool/tarantool#9398

Reviewed-by: Maxim Kokryashkin <[email protected]>
Reviewed-by: Sergey Bronnikov <[email protected]>
Signed-off-by: Sergey Kaplun <[email protected]>
(cherry picked from commit ff62d0c)
  • Loading branch information
Buristan committed Sep 5, 2024
1 parent 387c909 commit 7d65d9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/LuaJIT-tests/lang/stackov.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
local function f()
f()
end
jit.off(f)

local function g(i)
g(i)
end
jit.off(g)

local function vtail(...)
return vtail(1, ...)
end
jit.off(vtail)

local function vcall(...)
vcall(1, ...)
end
jit.off(vcall)

local function test_error_msg(func, s)
local first = string.match(s, "[^\n]+")
Expand Down

0 comments on commit 7d65d9a

Please sign in to comment.