[Tarantool-patches] [PATCH luajit] Consider slots used by upvalues in use-def analysis.
Igor Munkin
imun at tarantool.org
Thu Feb 15 16:48:57 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>
>
> Reported by XmiliaH.
>
> (cherry picked from commit 3a654999c6f00de4cb9e61232d23579442e544a0)
>
> `snap_usedef()` analysis doesn't check slots for child upvalues of the
> currentlly recorded function in use-def analysis. Hence, such slots may
> be considered unused and not stored in the snapshot. So on snapshot
> restoration, values from these slots may be lost.
>
> This patch adds a marking for all such local upvalues.
>
> Sergey Kaplun:
> * added the description and the test for the problem
>
> Part of tarantool/tarantool#9595
> ---
>
> Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-737-snap-usedef-upvalues
> Tarantool PR: https://github.com/tarantool/tarantool/pull/9662
> Related issues:
> * https://github.com/tarantool/tarantool/issues/9595
> * https://github.com/LuaJIT/LuaJIT/issues/737
>
> src/lj_snap.c | 35 +++++++++++-
> .../lj-737-snap-use-def-upvalues.test.lua | 55 +++++++++++++++++++
> 2 files changed, 87 insertions(+), 3 deletions(-)
> create mode 100644 test/tarantool-tests/lj-737-snap-use-def-upvalues.test.lua
>
<snipped>
> --
> 2.43.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list