Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov 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] DUALNUM: Add missing type conversion for FORI slots.
Date: Thu, 5 Mar 2026 15:09:08 +0300	[thread overview]
Message-ID: <7cb1512d-5028-47a7-8789-1e0f63deb5d6@tarantool.org> (raw)
In-Reply-To: <aalTojQh2jORvJvy@root>

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

Hi, Sergey,

LGTM

On 3/5/26 12:57, Sergey Kaplun wrote:
> Hi, Sergey!
> Thanks for the review.
> See my answer below.
>
> On 04.03.26, Sergey Bronnikov wrote:
>> Hi, Sergey,
>>
>> thanks for the patch!
>>
>> The bug cannot be reproduced with reverted fix.
>>
>> CMake: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DLUAJIT_NUMMODE=2
> You need to enable assertions as well.
Yep, with -DLUA_USE_ASSERT=ON it is reproduced.
>
>> Sergey
>>
>> On 3/2/26 11:14, Sergey Kaplun wrote:
>>> From: Mike Pall <mike>
>>>
>>> Reported by Sergey Kaplun.
>>>
>>> (cherry picked from commit 406cf69b3ae0a3ecd5ede2bb97b937b7a5d92074)
>>>
>>> `rec_for_loop()` narrows the FORL index values by getting them from the
>>> runtime. In case when the `start`, `stop`, `step` control variables are
>>> already loaded to the slots, their TRef isn't converted to the
>>> corresponding type. This leads to the following inconsistent IR dump and
>>> to the assertion failure later:
>>> | 0002 > int SLOAD  10   TCI
>>> | 0003   int ADD    0002  +1.
>>> | 0004 > int LE     0003  +1.
>>> | 0005   int ADD    0003  +1.
>>> | 0006 > int GT     0005  +1.
>>>
>>> This patch adds the missing type conversion.
>>>
>>> Sergey Kaplun:
>>> * added the description and the test for the problem
>>>
>>> Part of tarantool/tarantool#12134
>>> ---
>>>
>>> Branch:https://github.com/tarantool/luajit/tree/skaplun/lj-1413-missing-conv-fori
>>> Related issues:
>>> *https://github.com/LuaJIT/LuaJIT/issues/1413
>>> *https://github.com/tarantool/tarantool/issues/12134
>>>
> <snipped>
>

[-- Attachment #2: Type: text/html, Size: 2682 bytes --]

      reply	other threads:[~2026-03-05 12:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02  8:14 Sergey Kaplun via Tarantool-patches
2026-03-04 15:14 ` Sergey Bronnikov via Tarantool-patches
2026-03-05  9:57   ` Sergey Kaplun via Tarantool-patches
2026-03-05 12:09     ` 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=7cb1512d-5028-47a7-8789-1e0f63deb5d6@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] DUALNUM: Add missing type conversion for FORI slots.' \
    /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