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 FOLD rule for BUFHDR append. Date: Wed, 10 Jan 2024 08:51:32 +0000 [thread overview] Message-ID: <ZZ5alCghCAWWQSvE@tarantool.org> (raw) In-Reply-To: <20231114150455.2850-1-skaplun@tarantool.org> Sergey, I've checked the patchset into all long-term branches in tarantool/luajit and bumped a new version in master, release/2.11 and release/2.10. On 14.11.23, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall <mike> > > Reported by XmiliaH. > > (cherry-picked from commit bc1bdbf620f58f0978385828bc51272903601e17) > > `bufput_append()` may fold `BUFHDR RESET` + `BUFPUT` IRs to `BUFHDR > APPEND` even if the right operand (`BUFSTR`) is the PHI. If it's not the > last IR in the `BUFSTR` chain, this may lead to an incorrect resulting > value in the buffer, which contains a longer string since `APPEND` is > used instead of `RESET`. > > This patch adds the corresponding check inside the fold rule. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#9145 > --- > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-791-fold-bufhdr-append > Tarantool PR: https://github.com/tarantool/tarantool/pull/9369 > Relate issues: > * https://github.com/LuaJIT/LuaJIT/issues/791 > * https://github.com/tarantool/tarantool/issues/9145 > > src/lj_opt_fold.c | 3 +- > .../lj-791-fold-bufhdr-append.test.lua | 54 +++++++++++++++++++ > 2 files changed, 56 insertions(+), 1 deletion(-) > create mode 100644 test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua > <snipped> > -- > 2.42.0 > -- Best regards, IM
prev parent reply other threads:[~2024-01-10 8:58 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-14 15:04 Sergey Kaplun via Tarantool-patches 2023-11-17 11:06 ` Maxim Kokryashkin via Tarantool-patches 2023-11-20 11:21 ` Sergey Kaplun via Tarantool-patches 2023-11-24 12:50 ` Sergey Bronnikov via Tarantool-patches 2023-11-27 10:38 ` Sergey Kaplun via Tarantool-patches 2023-12-01 14:22 ` Sergey Bronnikov via Tarantool-patches 2024-01-10 8:51 ` 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=ZZ5alCghCAWWQSvE@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] Fix FOLD rule for BUFHDR append.' \ /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