[Tarantool-patches] [PATCH luajit 0/2] VM events and finalizers in separate state

Sergey Kaplun skaplun at tarantool.org
Sat Mar 28 18:31:15 MSK 2026


This patchset fixes the corner case of VM event stack overflow, which
results in broken JIT recording. The second patch is a fixup for the
first one.

Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-1403-vmevent-crash-on-stkov
Related issues:
* https://github.com/LuaJIT/LuaJIT/issues/1403
* https://github.com/LuaJIT/LuaJIT/issues/1445
* https://github.com/tarantool/tarantool/issues/12134

Mike Pall (2):
  Run VM events and finalizers in separate state.
  Fix VM event error handling for finalizers.

 src/lj_gc.c                                   | 22 +++--
 src/lj_obj.h                                  |  2 +
 src/lj_parse.c                                |  4 +-
 src/lj_state.c                                |  1 +
 src/lj_trace.c                                | 91 +++++++++----------
 src/lj_vmevent.c                              |  5 +
 src/lj_vmevent.h                              | 22 +++--
 test/LuaJIT-tests/lang/gc_debug.lua           | 11 +--
 .../lj-1403-vmevent-crash-on-stkov.test.lua   | 47 ++++++++++
 .../lj-1445-errfin-errmsg.test.lua            | 27 ++++++
 10 files changed, 154 insertions(+), 78 deletions(-)
 create mode 100644 test/tarantool-tests/lj-1403-vmevent-crash-on-stkov.test.lua
 create mode 100644 test/tarantool-tests/lj-1445-errfin-errmsg.test.lua

-- 
2.53.0



More information about the Tarantool-patches mailing list