[Tarantool-patches] [PATCH luajit] Avoid out-of-range number of results when compiling select(k, ...).
Igor Munkin
imun at tarantool.org
Thu Feb 15 16:47:22 MSK 2024
Sergey,
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 07.02.24, Sergey Kaplun via Tarantool-patches wrote:
> From: Mike Pall <mike>
>
> The interpreter will throw and abort the trace, anyway.
>
> (cherry picked from commit 6ca580155b035fd369f193cdee59391b594a5028)
>
> The `recff_select()` sets the amount of `RecordFFData` structure even
> for a negative first argument when trace is not recording (since the
> interpreter will throw an error anyway). This leads to excess IR
> emission and possible reads of dirty memory.
>
> This patch updates the `rd->nres` only in the case when a trace will be
> recorded.
>
> Sergey Kaplun:
> * added the description and the test for the problem
>
> Part of tarantool/tarantool#9595
> ---
>
> Branch: https://github.com/tarantool/luajit/tree/skaplun/fix-ff-select-recording
> Tarantool PR: https://github.com/tarantool/tarantool/pull/9659
> Related issue: https://github.com/tarantool/tarantool/issues/9595
>
> src/lj_ffrecord.c | 2 +-
> .../fix-ff-select-recording.test.lua | 44 +++++++++++++++++++
> 2 files changed, 45 insertions(+), 1 deletion(-)
> create mode 100644 test/tarantool-tests/fix-ff-select-recording.test.lua
>
<snipped>
> --
> 2.43.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list