From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Kaplun <skaplun@tarantool.org>,
Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 2/2] x64: Fix math.floor()/ceil() argument check.
Date: Mon, 23 Nov 2026 17:58:48 +0300 [thread overview]
Message-ID: <4515ce60-e177-46d1-bb7a-e2d9e51dd6b2@tarantool.org> (raw)
In-Reply-To: <7939469a9c9e06c7728a87addcd2bdf4efb56807.1795430601.git.skaplun@tarantool.org>
Hi, Sergey!
thanks for the patch! LGTM
Sergey
On 11/23/26 13:46, Sergey Kaplun wrote:
> From: Mike Pall <mike>
>
> Thanks to RaphaelIT7.
>
> (cherry picked from commit 849bbbe763e38080ae7ec6bd9b2be34156ec6b80)
>
> The `math.floor()`, `math.ceil()` VM implementation uses the `.ffunc`
> macro, which doesn't check the given arguments. If the top stack value
> contains some garbage number value, it will be used as the function
> result instead of raising an error.
>
> This patch fixes the behaviour for GC64 mode by using the correct
> `.ffunc_1` macro. The test is the same as for the non-GC64 mode.
>
> Sergey Kaplun:
> * added the description for the problem
>
> Part of tarantool/tarantool#13442
> ---
> src/vm_x64.dasc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc
> index 2eb4d752..e17f84e9 100644
> --- a/src/vm_x64.dasc
> +++ b/src/vm_x64.dasc
> @@ -1798,7 +1798,7 @@ static void build_subroutines(BuildCtx *ctx)
> | jmp ->vm_return
> |
> |.macro math_round, func
> - | .ffunc math_ .. func
> + | .ffunc_1 math_ .. func
> |.if DUALNUM
> | mov RB, [BASE]
> | checknumx RB, ->fff_resRB, je
prev parent reply other threads:[~2026-11-23 14:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 10:45 [Tarantool-patches] [PATCH luajit 0/2] " Sergey Kaplun via Tarantool-patches
2026-11-23 10:46 ` [Tarantool-patches] [PATCH luajit 1/2] x86: " Sergey Kaplun via Tarantool-patches
2026-11-23 14:51 ` Sergey Bronnikov via Tarantool-patches
2026-11-23 10:46 ` [Tarantool-patches] [PATCH luajit 2/2] x64: " Sergey Kaplun via Tarantool-patches
2026-11-23 14:58 ` Sergey Bronnikov 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=4515ce60-e177-46d1-bb7a-e2d9e51dd6b2@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=e.temirgaleev@tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 2/2] x64: Fix math.floor()/ceil() argument check.' \
/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