<HTML><BODY><div>Hi!</div><div>Looks good to me</div><div> </div><div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Best regards,</div><div>Maxim Kokryashkin</div></div></div><div> </div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Понедельник, 12 февраля 2024, 10:40 +03:00 от Sergey Kaplun <skaplun@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_17077236170634586420_BODY">Hi, folks!<br>I've added several comments to the test I was bothered about.<br>See them on the branch:<br><a href="https://github.com/tarantool/luajit/tree/skaplun/lj-611-always-snapshot-functions-for-non-base-frames" target="_blank">https://github.com/tarantool/luajit/tree/skaplun/lj-611-always-snapshot-functions-for-non-base-frames</a><br><br>Also, I rebased it on the tarantool/master branch.<br><br>===================================================================<br>diff --git a/test/tarantool-tests/lj-611-gc64-inherit-frame-slot.test.lua b/test/tarantool-tests/lj-611-gc64-inherit-frame-slot.test.lua<br>index 8fc5b663..b7347267 100644<br>--- a/test/tarantool-tests/lj-611-gc64-inherit-frame-slot.test.lua<br>+++ b/test/tarantool-tests/lj-611-gc64-inherit-frame-slot.test.lua<br>@@ -3,8 +3,9 @@ local test = tap.test('lj-611-gc64-inherit-frame-slot'):skipcond({<br> ['Test requires JIT enabled'] = not jit.status(),<br> })<br> <br>--- GC64: Function missing in snapshot for non-base frame<br>--- <a href="https://github.com/LuaJIT/LuaJIT/issues/611" target="_blank">https://github.com/LuaJIT/LuaJIT/issues/611</a><br>+-- GC64: Function missing in snapshot for non-base frame.<br>+-- The reproducer is generated from the fuzzer.<br>+-- <a href="https://github.com/LuaJIT/LuaJIT/issues/611" target="_blank">https://github.com/LuaJIT/LuaJIT/issues/611</a>.<br> <br> test:plan(1)<br> <br>@@ -13,7 +14,9 @@ jit.opt.start('hotloop=1', 'hotexit=1')<br> local inner_counter = 0<br> local SIDE_START = 1<br> -- Lower frame to return from `inner()` function side trace.<br>--- TODO: Give a reason for vararg func.<br>+-- XXX: Use a vararg frame to prevent compilation of the function.<br>+-- The FNEW bytecode is NIY for now, so this helps to avoid trace<br>+-- blacklisting.<br> local function lower_frame(...)<br> local inner = function()<br> if inner_counter > SIDE_START then<br>@@ -21,10 +24,18 @@ local function lower_frame(...)<br> end<br> inner_counter = inner_counter + 1<br> end<br>+ -- XXX: We need to return to the lower frame (to the same<br>+ -- function) several times to produce the necessary side traces.<br>+ -- See `jit.dump()` for the details.<br> inner(..., inner(inner()))<br> end<br> <br> -- Compile `inner()` function.<br>+-- XXX: We need at least 3 calls to create several function<br>+-- objects from the prototype of the `inner()` function and hit<br>+-- the `PROTO_CLC_POLY` limit, so the side traces stop spawning.<br>+-- See also:<br>+-- <a href="https://github.com/tarantool/tarantool/wiki/LuaJIT-function-inlining" target="_blank">https://github.com/tarantool/tarantool/wiki/LuaJIT-function-inlining</a>.<br> lower_frame()<br> lower_frame()<br> -- Compile hotexit.<br>===================================================================<br><br>Can you please verify that these changes are OK for you, so we can<br>proceed with the backporting of the patch?<br><br>--<br>Best regards,<br>Sergey Kaplun</div></div></div></div></blockquote><div> </div></BODY></HTML>