Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the C hook.
@ 2023-06-22 14:29 Sergey Kaplun via Tarantool-patches
  2023-06-22 14:29 ` [Tarantool-patches] [PATCH luajit 1/2] Fix lua_yield() from " Sergey Kaplun via Tarantool-patches
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2023-06-22 14:29 UTC (permalink / raw)
  To: Igor Munkin, Maxim Kokryashkin; +Cc: tarantool-patches

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-04 17:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-22 14:29 [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the C hook Sergey Kaplun via Tarantool-patches
2023-06-22 14:29 ` [Tarantool-patches] [PATCH luajit 1/2] Fix lua_yield() from " Sergey Kaplun via Tarantool-patches
2023-06-29  8:44   ` Maxim Kokryashkin via Tarantool-patches
2023-06-29 11:11     ` Sergey Kaplun via Tarantool-patches
2023-06-29 22:27       ` Maxim Kokryashkin via Tarantool-patches
2023-07-01 11:44   ` Igor Munkin via Tarantool-patches
2023-06-22 14:29 ` [Tarantool-patches] [PATCH luajit 2/2] Another fix for " Sergey Kaplun via Tarantool-patches
2023-06-29  9:09   ` Maxim Kokryashkin via Tarantool-patches
2023-06-29 11:21     ` Sergey Kaplun via Tarantool-patches
2023-06-29 22:28       ` Maxim Kokryashkin via Tarantool-patches
2023-07-01 12:09   ` Igor Munkin via Tarantool-patches
2023-07-04 17:10 ` [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the " Igor Munkin via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox