From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Kaplun <skaplun@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit] Fix maxslots when recording BC_TSETM. Date: Fri, 1 Sep 2023 15:45:19 +0000 [thread overview] Message-ID: <ZPIHD/ZGJhsZBtrN@tarantool.org> (raw) In-Reply-To: <20230825150024.23247-1-skaplun@tarantool.org> Sergey, I've checked the patchset into all long-term branches in tarantool/luajit and bumped a new version in master, release/2.11 and release/2.10. On 25.08.23, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall <mike> > > Analyzed by Sergey Kaplun. > > (cherry-picked from commit 0cc5fdfbc0810073485150eb184dc358dab507d9) > > Recording of the `BC_TSETM` bytecode may keep too optimistic JIT > maxslot. In that case, the slot above the top of the Lua stack may be > considered used. When any VM event handler is called before the > recording of the next instruction, this leads to an assertion failure in > `rec_check_slots()`. > > This patch sets the `ra` as a maxslot, as far as the `ra` - 1 contains a > table, which is always the highest slot after this bytecode. Also, it > adds an assertion that we check slots below the top of the Lua stack. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#8825 > --- > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-1025-tsetm-maxslot > Tarantool PR: https://github.com/tarantool/tarantool/pull/9040 > Issues: > * https://github.com/LuaJIT/LuaJIT/issues/1025 > * https://github.com/tarantool/tarantool/issues/8825 > > src/lj_record.c | 2 + > .../lj-1025-tsetm-maxslot.test.lua | 52 +++++++++++++++++++ > 2 files changed, 54 insertions(+) > create mode 100644 test/tarantool-tests/lj-1025-tsetm-maxslot.test.lua > <snipped> > -- > 2.41.0 > -- Best regards, IM
prev parent reply other threads:[~2023-09-01 16:02 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-25 15:00 Sergey Kaplun via Tarantool-patches 2023-08-28 12:58 ` Sergey Bronnikov via Tarantool-patches 2023-08-28 14:04 ` Sergey Kaplun via Tarantool-patches 2023-08-28 15:00 ` Maxim Kokryashkin via Tarantool-patches 2023-08-28 15:02 ` Sergey Kaplun via Tarantool-patches 2023-08-28 15:16 ` Maxim Kokryashkin via Tarantool-patches 2023-08-28 15:19 ` Sergey Kaplun via Tarantool-patches 2023-09-01 15:45 ` Igor Munkin via Tarantool-patches [this message]
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=ZPIHD/ZGJhsZBtrN@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] Fix maxslots when recording BC_TSETM.' \ /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