[Tarantool-patches] [PATCH luajit 0/2][v2] Fix cdata finalizer table
Sergey Bronnikov
estetus at gmail.com
Tue Jul 9 13:45:46 MSK 2024
From: Sergey Bronnikov <sergeyb at tarantool.org>
Branch: https://github.com/tarantool/luajit/tree/ligurio/lj-1168-heap-use-after-free-on-access-to-CTState-finalizer-nointegration
NOTE: Jobs with Tarantool regression tests has failed because
patch "FFI: Turn FFI finalizer table into a proper GC root."
broke Tarantool build and fix (see below) must be applied before
a bump to LuaJIT version with proposed patches.
Branch with fix in Tarantool: https://github.com/ligurio/tarantool/tree/ligurio/lj-1168-heap-use-after-free-on-access-to-CTState-finalizer
Issues:
- https://github.com/luaJIT/luaJIT/issues/1168
- https://github.com/tarantool/tarantool/issues/10199
Mike Pall (2):
FFI: Treat cdata finalizer table as a GC root.
FFI: Turn FFI finalizer table into a proper GC root.
src/lib_ffi.c | 20 +---
src/lj_cdata.c | 2 +-
src/lj_ctype.c | 12 ++
src/lj_ctype.h | 2 +-
src/lj_gc.c | 38 +++---
src/lj_obj.h | 3 +
src/lj_state.c | 3 +
...free-on-access-to-CTState-finalizer.test.c | 108 ++++++++++++++++++
...ee-on-access-to-CTState-finalizer.test.lua | 18 +++
9 files changed, 165 insertions(+), 41 deletions(-)
create mode 100644 test/tarantool-c-tests/lj-1168-heap-use-after-free-on-access-to-CTState-finalizer.test.c
create mode 100644 test/tarantool-tests/lj-1168-heap-use-after-free-on-access-to-CTState-finalizer.test.lua
--
2.34.1
More information about the Tarantool-patches
mailing list