From: Igor Munkin 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] Fix write barrier for lua_setupvalue() and debug.setupvalue().
Date: Thu, 30 Jun 2022 15:10:49 +0300 [thread overview]
Message-ID: <Yr2SycDl1a6O9tH6@tarantool.org> (raw)
In-Reply-To: <20211215101734.6065-1-skaplun@tarantool.org>
Sergey,
I've checked the patch into all long-term branches in tarantool/luajit
and bumped a new version in master, 2.10 and 1.10.
On 15.12.21, Sergey Kaplun wrote:
> From: Mike Pall <mike>
>
> (cherry picked from e613105ca92fe25e7bd63031b409faa8c908ac35)
>
> Child function inherits parents upvalues. Assume parent function is
> marked first (all closed upvalues and function are colored to black),
> and then `debug.setupvalue()`/`lua_setupvalue()` is called for an
> unmarked child function with inherited upvalues. The barrier is tried to
> move forward (but not actually move, due to the colors of operands) for
> a non-marked function (instead marked upvalue). Now black upvalue refers
> to a white object. Black objects can't refer white objects due to GC
> invariant, so the invariant is violated.
>
> This patch changes a function object to an upvalue for barrier movement.
>
> Sergey Kaplun:
> * added the description and the test for the problem
>
> Part of tarantool/tarantool#6548
> ---
> Related issue: https://github.com/tarantool/tarantool/issues/6548
> Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-gc-setupvalue-full-ci
> Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-fix-gc-setupvalue-full-ci
>
> Note: CI is red. But this job is red on master too...
>
> src/lj_api.c | 8 ++-
> src/lj_debug.c | 7 ++-
> src/lj_debug.h | 3 +-
> .../fix-gc-setupvalue.test.lua | 60 +++++++++++++++++++
> test/tarantool-tests/utils.lua | 32 ++++++++++
> 5 files changed, 104 insertions(+), 6 deletions(-)
> create mode 100644 test/tarantool-tests/fix-gc-setupvalue.test.lua
>
<snipped>
> --
> 2.34.1
>
--
Best regards,
IM
prev parent reply other threads:[~2022-06-30 12:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 10:17 Sergey Kaplun via Tarantool-patches
2022-06-06 15:15 ` sergos via Tarantool-patches
2022-06-10 8:25 ` Sergey Kaplun via Tarantool-patches
2022-06-28 15:28 ` Igor Munkin via Tarantool-patches
2022-06-30 12:10 ` Igor Munkin 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=Yr2SycDl1a6O9tH6@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=imun@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit] Fix write barrier for lua_setupvalue() and debug.setupvalue().' \
/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