Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>,
	Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the C hook.
Date: Thu, 22 Jun 2023 17:29:17 +0300	[thread overview]
Message-ID: <cover.1687439049.git.skaplun@tarantool.org> (raw)

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


             reply	other threads:[~2023-06-22 14:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 14:29 Sergey Kaplun via Tarantool-patches [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1687439049.git.skaplun@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the C hook.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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