[Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the C hook.
Sergey Kaplun
skaplun at tarantool.org
Thu Jun 22 17:29:17 MSK 2023
This patchset fixes the behaviour of the `lua_yield()` invocation inside
C hooks. The first patch fixes the behaviour for non-GC64 mode, but the
GC64 mode is still failing with a core dump. The second patch fixes
behaviour for the GC64 mode as well.
This patchset is based on the our C tests to be introduced, but their
patch set has 2 LGTMs, so I just checkout this branch from the branch
with C tests.
PR: https://github.com/tarantool/tarantool/pull/8804
Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-yield-c-hook
Related issue: https://github.com/tarantool/tarantool/issues/8516
Mail list: https://www.freelists.org/post/luajit/BUG-Unable-to-yield-in-a-debug-hook-in-latest-21-beta
Mike Pall (2):
Fix lua_yield() from C hook.
Another fix for lua_yield() from C hook.
src/lj_api.c | 5 +-
src/lj_ccallback.c | 2 +-
src/lj_err.c | 2 +-
src/lj_frame.h | 2 +-
src/lj_meta.c | 2 +-
.../fix-yield-c-hook-script.lua | 19 +++++++
.../tarantool-c-tests/fix-yield-c-hook.test.c | 49 +++++++++++++++++++
7 files changed, 75 insertions(+), 6 deletions(-)
create mode 100644 test/tarantool-c-tests/fix-yield-c-hook-script.lua
create mode 100644 test/tarantool-c-tests/fix-yield-c-hook.test.c
--
2.34.1
More information about the Tarantool-patches
mailing list