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 IR_BUFPUT assembly. Date: Thu, 22 Jul 2021 10:51:58 +0300 [thread overview] Message-ID: <20210722075158.GK11494@tarantool.org> (raw) In-Reply-To: <20210712120652.23695-1-skaplun@tarantool.org> Sergey, I've checked the patch into all long-term branches in tarantool/luajit and bumped a new version in 1.10, 2.7, 2.8 and master. On 12.07.21, Sergey Kaplun wrote: > From: Mike Pall <mike> > > Thanks to Peter Cawley. > > (cherry picked from commit 58d0dde0a2df49abc991decbabff15230010829a) > > When recording IR_BUFPTR special variable holds -1 value to mark that > argument to store is not a single character. If it is, then it can be > stored in a register directly. When storing a single character we store > it in the aforementioned variable first to reset the -1 value. But when > the system has signed characters, and the character to store equals > \255, the check that the variable still holds -1 value becomes false > positive and either wrong value is stored or the LuaJIT crashes. > > This patch changes the flag value to -129 to avoid intersections with > any `char` values. > > Sergey Kaplun: > * added the description and the test for the problem > --- > > The patch fixes the problem described in TNT-142. > > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/lj-375-fix-ir-bufput > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-375-fix-ir-bufput > Issue: https://github.com/LuaJIT/LuaJIT/issues/375 > > src/lj_asm.c | 6 +++--- > .../lj-375-ir-bufput-signed-char.test.lua | 17 +++++++++++++++++ > 2 files changed, 20 insertions(+), 3 deletions(-) > create mode 100644 test/tarantool-tests/lj-375-ir-bufput-signed-char.test.lua > <snipped> > -- > 2.31.0 > -- Best regards, IM
prev parent reply other threads:[~2021-07-22 8:15 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-12 12:06 Sergey Kaplun via Tarantool-patches 2021-07-19 22:25 ` Igor Munkin via Tarantool-patches 2021-07-20 12:17 ` Sergey Kaplun via Tarantool-patches 2021-07-21 9:30 ` Sergey Kaplun via Tarantool-patches 2021-07-20 15:22 ` Sergey Ostanevich via Tarantool-patches 2021-07-22 7: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=20210722075158.GK11494@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] Fix IR_BUFPUT assembly.' \ /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