Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <m.kokryashkin@tarantool.org>,
	Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH luajit] test: off JIT for routines in <lang/stackov.lua>
Date: Thu,  5 Sep 2024 13:14:14 +0300	[thread overview]
Message-ID: <20240905101414.26838-1-skaplun@tarantool.org> (raw)

This patch is a follow-up to the commit
6a3a97cd8111a2164143fcf81439f70588e0be42 ("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 #9398
---

Branch: https://github.com/tarantool/luajit/tree/skaplun/follow-up-fix-gh-9398-p2

 test/LuaJIT-tests/lang/stackov.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/LuaJIT-tests/lang/stackov.lua b/test/LuaJIT-tests/lang/stackov.lua
index 21ae40b6..8afa86b4 100644
--- a/test/LuaJIT-tests/lang/stackov.lua
+++ b/test/LuaJIT-tests/lang/stackov.lua
@@ -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]+")
-- 
2.46.0


             reply	other threads:[~2024-09-05 10:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 10:14 Sergey Kaplun via Tarantool-patches [this message]
2024-09-05 10:29 ` Maxim Kokryashkin via Tarantool-patches
2024-09-05 11:02 ` Sergey Bronnikov via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240905101414.26838-1-skaplun@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] test: off JIT for routines in <lang/stackov.lua>' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox