From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <max.kokryashkin@gmail.com>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 5/5] Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc.
Date: Thu, 16 Feb 2023 10:03:24 +0300 [thread overview]
Message-ID: <Y+3VPAG5un6WXAqf@root> (raw)
In-Reply-To: <ec18f757ee02e5448f65aa6c7582cb3182313cf3.1676413474.git.m.kokryashkin@tarantool.org>
Hi, Maxim!
Thanks for the patch!
Please consider my comments below.
On 15.02.23, Maxim Kokryashkin wrote:
> From: Mike Pall <mike>
>
> Reported by Victor Bombi, analyzed by XmiliaH. Thanks!
>
> (cherry-picked from commit bf51d3535109c4745bfbbe19a5587a9eac00259a)
>
> If the `snapalloc` flag is set, then the allocation hasn't
> occurred yet, meaning that rename is applied to the next
> snapshot. Otherwise, refs are already allocated and rename
> is applied to current applied to current snapshot.
Typo: s<applied to current applied to current snapshot>
<applied to the current snapshot>
>
> Maxim Kokryashkin:
> * added the description for the problem
>
> Part of tarantool/tarantool#7745
I suggest to add the following:
| Part of tarantool/tarantool#8069
> ---
> src/lj_asm.c | 9 ++++++++-
It will be nice to see the testcase, anyway.
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/lj_asm.c b/src/lj_asm.c
> index adfaf286..929a6da6 100644
> --- a/src/lj_asm.c
> +++ b/src/lj_asm.c
> @@ -682,7 +682,14 @@ static void ra_rename(ASMState *as, Reg down, Reg up)
> RA_DBGX((as, "rename $f $r $r", regcost_ref(as->cost[up]), down, up));
> emit_movrr(as, ir, down, up); /* Backwards codegen needs inverse move. */
> if (!ra_hasspill(IR(ref)->s)) { /* Add the rename to the IR. */
> - ra_addrename(as, down, ref, as->snapno);
> + /*
> + ** The rename is effective at the subsequent (already emitted) exit
> + ** branch. This is for the current snapshot (as->snapno). Except if we
> + ** haven't yet allocated any refs for the snapshot (as->snapalloc == 1),
> + ** then it belongs to the next snapshot.
> + ** See also the discussion at asm_snap_checkrename().
> + */
> + ra_addrename(as, down, ref, as->snapno + as->snapalloc);
> }
> }
>
> --
> 2.39.0
>
--
Best regards,
Sergey Kaplun
prev parent reply other threads:[~2023-02-16 7:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 22:30 [Tarantool-patches] [PATCH luajit 0/5] jit: add exception unwinding Maxim Kokryashkin via Tarantool-patches
2023-02-14 22:30 ` [Tarantool-patches] [PATCH luajit 1/5] test: disable `lj-603-snap-restore` test Maxim Kokryashkin via Tarantool-patches
2023-02-14 22:30 ` [Tarantool-patches] [PATCH luajit 2/5] Handle on-trace OOM errors from helper functions Maxim Kokryashkin via Tarantool-patches
2023-02-16 11:36 ` Sergey Kaplun via Tarantool-patches
2023-02-14 22:30 ` [Tarantool-patches] [PATCH luajit 3/5] Disable unreliable assertion for external frame unwinding Maxim Kokryashkin via Tarantool-patches
2023-02-16 6:58 ` Sergey Kaplun via Tarantool-patches
2023-02-14 22:30 ` [Tarantool-patches] [PATCH luajit 4/5] OSX: " Maxim Kokryashkin via Tarantool-patches
2023-02-16 6:50 ` Sergey Kaplun via Tarantool-patches
2023-02-14 22:30 ` [Tarantool-patches] [PATCH luajit 5/5] Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc Maxim Kokryashkin via Tarantool-patches
2023-02-16 7:03 ` Sergey Kaplun via Tarantool-patches [this message]
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=Y+3VPAG5un6WXAqf@root \
--to=tarantool-patches@dev.tarantool.org \
--cc=max.kokryashkin@gmail.com \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 5/5] Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc.' \
/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