[Tarantool-patches] [PATCH luajit 1/2] Fix edge cases when generating IR for string.byte/sub/find.
Sergey Kaplun
skaplun at tarantool.org
Tue Mar 10 14:07:22 MSK 2026
Hi, Sergey!
Thanks for the review!
Fixed your comment and rebased the branch to the current tarantool/master.
On 10.03.26, Sergey Bronnikov wrote:
> Hi, Sergey,
>
> thanks for the patch! LGTM with a minor comment below.
>
> Sergey
>
> On 3/6/26 16:42, Sergey Kaplun wrote:
> > From: Mike Pall <mike>
> >
> > Contributed by XmiliaH.
> >
> > (cherry picked from commit af9763a50da87ff8ba16e828cbd5664135e05a88)
> >
> > The generated ADD/SUB IRs for the calculation of indexes in the string
> > for the aforementioned build-ins don't check the overflow. This may lead
> s/build-ins/built-ins/
Fixed, thanks!
> > to the incorrect results, incorrect trace semantics, or invalid memory
> > access. Also, the negative values may pass the UGT guard check emitted
> > for the positive `end` position and lead to the incorrect results on the
> > trace.
> >
> > This patch fixes this by using guarded ADDOV/SUBOV instead. The UGT IR
> > is replaced with GT.
> >
> > Sergey Kaplun:
> > * added the description and the test for the problem
> >
> > Part of tarantool/tarantool#12134
> > ---
>
> <snipped>
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list