[Tarantool-patches] [PATCH luajit] LJ_GC64: Fix HREFK optimization.

Igor Munkin imun at tarantool.org
Thu Feb 15 16:42:33 MSK 2024


Max,

I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in master, release/3.0 and
release/2.11.

On 12.01.24, Maxim Kokryashkin via Tarantool-patches wrote:
> From: Mike Pall <mike>
> 
> Contributed by XmiliaH.
> 
> (cherry-picked from commit 91bc6b8ad1f373c1ce9003dc024b2e21fad0e444)
> 
> In `lj_record_idx` when `ix->oldv` is the global nilnode and the
> required key is not present in the table, it is possible to pass
> the constant key lookup optimization condition because of the
> `uint32_t` overflow. Because of that, further recording
> incorrectly removes the check for the nilnode, which produces
> wrong results when trace is called for a different table.
> 
> Maxim Kokryashkin:
> * added the description and the test for the problem
> 
> Part of tarantool/tarantool#9145
> ---
> Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-840-fix-hrefk-optimization
> PR: https://github.com/tarantool/tarantool/pull/9591
> Issues: https://github.com/LuaJIT/LuaJIT/issues/840
> https://github.com/tarantool/tarantool/issues/9145
> 
>  src/lj_record.c                               |  8 +--
>  .../lj-840-fix-hrefk-optimization.test.lua    | 58 +++++++++++++++++++
>  2 files changed, 62 insertions(+), 4 deletions(-)
>  create mode 100644 test/tarantool-tests/lj-840-fix-hrefk-optimization.test.lua
> 

<snipped>

> --
> 2.43.0
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list