[Tarantool-patches] [PATCH luajit] Handle table unsinking in the presence of IRFL_TAB_NOMM.
Igor Munkin
imun at tarantool.org
Wed Sep 27 15:33:50 MSK 2023
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 29.08.23, Sergey Kaplun via Tarantool-patches wrote:
> From: Mike Pall <mike>
>
> Reported by Sergey Kaplun.
>
> (cherry-picked from commit 0ef51b495f9497aac77b41eb3d837c9c38b9424b)
>
> Table `NEWREF` storage for non-constant keys also emits `FREF` IR with
> `IRFL_TAB_NOMM` to invalidate the metamethod cache. When table creation
> and `NEWREF` are sinked, the corresponding `FSTORE` is sinked too and
> should be restored on trace exit. However, `snap_unsink()` doesn't
> expect anything except `IRFL_TAB_META` as the second operand of `FREF`,
> so the corresponding assertion fails.
>
> This patch adds a switch-case statement to handle the `IRFL_TAB_NOMM`
> case. Since `FREF` with `IRFL_TAB_NOMM` always follows some hash store,
> we can avoid a duplication of the cache invalidation, so this case just
> does nothing.
>
> 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-1052-unsink-with-irfl-tab-nomm
> Tarantool PR: https://github.com/tarantool/tarantool/pull/9055
> Related issues:
> * https://github.com/LuaJIT/LuaJIT/issues/1052
> * https://github.com/tarantool/tarantool/issues/8825
>
> src/lj_snap.c | 18 +++++++---
> ...lj-1052-unsink-with-irfl-tab-nomm.test.lua | 36 +++++++++++++++++++
> 2 files changed, 49 insertions(+), 5 deletions(-)
> create mode 100644 test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua
>
<snipped>
> --
> 2.42.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list