[Tarantool-patches] [PATCH luajit] LJ_GC64: Fix IR_VARG offset for fixed number of results.
imun at tarantool.org
Tue Jul 19 03:14:18 MSK 2022
Thanks for your patch! LGTM, after the fixes you've made against
Sergos' review comments.
On 13.07.22, Sergey Kaplun wrote:
> From: Mike Pall <mike>
> Reported by George Vaintrub. Fixed by Sergey Kaplun.
> (cherry picked from commit 6bda30d8c745b3963ba870221b9be6acdffed9b1)
> This bug occurs when recording `BC_VARG` with the following conditions:
> 1) varargs undefined on trace.
> 2) known fixed number of results.
> For this case the vararg slots loads via `IR_VLOAD` by offset from
> vararg base. In GC64 mode this offset was miscounting due to missing
> `LJ_FR2` correction in the base TRef calculation. As the result the
> wrong (+1) vararg slot is used.
> This patch adds the missing the aforementioned `LJ_FR2` correction.
> Sergey Kaplun:
> * added the description and the test for the problem
> Resolves tarantool/tarantool#7172
> Part of tarantool/tarantool#7230
> Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-864-varg-rec-base-offset-full-ci
> * https://github.com/tarantool/tarantool/issues/7172
> * https://github.com/LuaJIT/LuaJIT/issues/864
> src/lj_record.c | 2 +-
> .../lj-864-varg-rec-base-offset.test.lua | 25 +++++++++++++++++++
> 2 files changed, 26 insertions(+), 1 deletion(-)
> create mode 100644 test/tarantool-tests/lj-864-varg-rec-base-offset.test.lua
More information about the Tarantool-patches