[Tarantool-patches] [PATCH luajit] Fix TDUP load forwarding after table rehash.
Igor Munkin
imun at tarantool.org
Thu Aug 31 18:19:30 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 17.08.23, Sergey Kaplun via Tarantool-patches wrote:
> From: Mike Pall <mike>
>
> Reported by Sergey Kaplun.
>
> (cherry-picked from commit c7db8255e1eb59f933fac7bc9322f0e4f8ddc6e6)
>
> After table rehashing number keys loaded via ALOAD may be placed in the
> hash part of the table. So, load forwarding analysis missed the
> corresponding stores like they are never existed. In such case, either
> we faced an assertion failure in `fwd_ahload()` due to values types
> mismatch, either we faced an assertion failure in `rec_check_slots()`
> since forwarded value by the JIT compiler isn't the same as it is in the
> interpreter.
>
> This patch adds a check that there is no any `IR_NEWREF` after table
> creation, so it can't be rehashed.
>
> 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-980-load-fwd-after-table-rehash
> PR: https://github.com/tarantool/tarantool/pull/8998
> Related issues:
> * https://github.com/LuaJIT/LuaJIT/issues/980
> * https://github.com/tarantool/tarantool/issues/8825
>
> src/lj_opt_mem.c | 6 +
> ...j-980-load-fwd-after-table-rehash.test.lua | 166 ++++++++++++++++++
> 2 files changed, 172 insertions(+)
> create mode 100644 test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua
>
<snipped>
> --
> 2.41.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list