From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Maksim Kokryashkin <max.kokryashkin@gmail.com> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit v8] Fix math.min()/math.max() inconsistencies. Date: Thu, 30 Mar 2023 17:37:25 +0000 [thread overview] Message-ID: <ZCXI1VZQ81YAvBJX@tarantool.org> (raw) In-Reply-To: <20230208200550.48291-1-max.kokryashkin@gmail.com> Max, I've checked the patchset into all long-term branches in tarantool/luajit and bumped a new version in master, 2.11 and 2.10. On 08.02.23, Maksim Kokryashkin via Tarantool-patches wrote: > From: Mike Pall <mike> > > (cherry-picked from commit 03208c8162af9cc01ca76ee1676ca79e5abe9b60) > > `math.min()`/`math.max()` could produce different results. > Previously, dirty values on the Lua stack could be > treated as arguments to `math.min()`/`math.max()`. > This patch adds check for the number of arguments provided to > math.min/max, which fixes the issue. > > Also, several fold optimizations were modified or > deleted due to inconsistencies between compiler > and interpreter on NaN-values. > > Changes in `fold_kfold_numarith()` also required > to replace the `CC_LO/CC_HI` comparison modes with the `CC_LE/CC_PL` > on aarch64 platforms. The issue is thoroughly described just before > the corresponding test. > > Changes for MIPS and PPC architectures are ommited, due to the > absence of other patches the are dependent on. > > Maxim Kokryashkin & Sergey Kaplun: > * added the description and tests for the problem > > Resolves tarantool/tarantool#6163 > --- > Changes in v8: > - Fixed comments as per review by Sergey > > Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-6163-min-max > PR: https://github.com/tarantool/tarantool/pull/7455 > Issue for x86 misbehavior: https://github.com/LuaJIT/LuaJIT/issues/957 > src/lj_asm_arm.h | 6 +- > src/lj_asm_arm64.h | 6 +- > src/lj_opt_fold.c | 53 ++-- > src/lj_vmmath.c | 4 +- > src/vm_arm.dasc | 4 +- > src/vm_arm64.dasc | 4 +- > src/vm_x64.dasc | 2 +- > src/vm_x86.dasc | 2 +- > test/tarantool-tests/gh-6163-min-max.test.lua | 263 ++++++++++++++++++ > 9 files changed, 296 insertions(+), 48 deletions(-) > create mode 100644 test/tarantool-tests/gh-6163-min-max.test.lua > <snipped> > -- > 2.37.1 (Apple Git-137.1) > -- Best regards, IM
prev parent reply other threads:[~2023-03-30 17:45 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-08 20:05 Maksim Kokryashkin via Tarantool-patches 2023-03-03 12:28 ` sergos via Tarantool-patches 2023-03-06 14:52 ` Maxim Kokryashkin via Tarantool-patches 2023-03-06 14:57 ` sergos via Tarantool-patches 2023-03-30 17:37 ` 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=ZCXI1VZQ81YAvBJX@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=max.kokryashkin@gmail.com \ --subject='Re: [Tarantool-patches] [PATCH luajit v8] Fix math.min()/math.max() inconsistencies.' \ /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