Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: "Sergey Kaplun" <skaplun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches]  [PATCH luajit 2/2] Another fix for lua_yield() from C hook.
Date: Fri, 30 Jun 2023 01:28:18 +0300	[thread overview]
Message-ID: <1688077698.697060560@f386.i.mail.ru> (raw)
In-Reply-To: <ZJ1pIXOLEquF1aPg@root>

[-- Attachment #1: Type: text/plain, Size: 3132 bytes --]


Hi!
Thanks for the fixes!
LGTM
--
Best regards,
Maxim Kokryashkin
 
 
> 
>>Hi, Maxim!
>>Thanks for the review!
>>Fixed your comments and force-pushed the branch.
>>
>>On 29.06.23, Maxim Kokryashkin wrote:
>>>
>>> Hi, Sergey!
>>> LGTM, except for a few comments and the single note below.
>>> > 
>>> >>From: Mike Pall <mike>
>>> >>
>>> >>Reported by Jason Carr.
>>> >>
>>> >>(cherry picked from commit dd0f09f95f36caf1f2111c10fec02748116003bb)
>>> >>
>>> >>This commit is the follow up for the previous commit ("Fix lua_yield()
>>> >>from C hook."). In GC64 mode stack slot for a GC thread object is still
>>> >>miscalculated during creating a continuation frame for `lua_yield()`
>>> >Typo: s/during creating/during the creation of/
>>
>>Fixed.
>>
>>> >>.This happens due to tricky usage of the previous slot instead of the
>>> >Typo: s/due to/due to the/
>>
>>Fixed.
>>
>>> >>given one in `setframe_gc()` macro.
>>> >>
>>> >>This patch changes the semantics of `setframe_gc()` macro to use the
>>> >>given as argument slot as the destination to store GC value. Also, it
>>> >Typo: s/the given as argument slot/the slot given as argument/
>>
>>Fixed.
>>
>>> >>fixups all usages of this macro to match new semantics.
>>> >Typo: s/new/the new/
>>
>>Fixed.
>>
>>> > 
>>> >Also, I strongly suggest to distinct the changes that directly relate
>>> >to the issue, from the semantic fixups related to the macro update.
>>> >An additional sentence or a list in the commit message would be enough.
>>
>>I mention all places with changed semantics to avoid misunderstanding.
>>The commit message looks like the following:
>>
>>===================================================================
>>Another fix for lua_yield() from C hook.
>>
>>Reported by Jason Carr.
>>
>>(cherry picked from commit dd0f09f95f36caf1f2111c10fec02748116003bb)
>>
>>This commit is the follow up for the previous commit ("Fix lua_yield()
>>from C hook."). In GC64 mode stack slot for a GC thread object is still
>>miscalculated during the creation of a continuation frame for
>>`lua_yield()`. This happens due to the tricky usage of the previous slot
>>instead of the given one in `setframe_gc()` macro.
>>
>>This patch changes the semantics of `setframe_gc()` macro to use the
>>slot given as argument as the destination to store GC value. Also, it
>>fixups all usages of this macro to match the new semantics, i.e. in:
>>* <src/lj_ccallback.c>
>>* <src/lj_err.c>
>>* <src/lj_meta.c>
>>
>>Sergey Kaplun:
>>* added the description for the problem
>>
>>Part of tarantool/tarantool#8516
>>===================================================================
>>
>>> >>
>>> >>Sergey Kaplun:
>>> >>* added the description for the problem
>>> >>
>>> >>Part of tarantool/tarantool#8516
>>> >>---
>>> >> src/lj_ccallback.c | 2 +-
>>> >> src/lj_err.c | 2 +-
>>> >> src/lj_frame.h | 2 +-
>>> >> src/lj_meta.c | 2 +-
>>> >> test/tarantool-c-tests/fix-yield-c-hook.test.c | 4 ----
>>> >> 5 files changed, 4 insertions(+), 8 deletions(-)
>>> >>
>>
>><snipped>
>>
>>> >--
>>> >Best regards,
>>> >Maxim Kokryashkin
>>> > 
>>
>>--
>>Best regards,
>>Sergey Kaplun
> 

[-- Attachment #2: Type: text/html, Size: 4172 bytes --]

  reply	other threads:[~2023-06-29 22:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 14:29 [Tarantool-patches] [PATCH luajit 0/2] Fix lua_yield from the " 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 [this message]
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=1688077698.697060560@f386.i.mail.ru \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches]  [PATCH luajit 2/2] Another fix for lua_yield() from 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