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 1/2] Fix edge cases when generating IR for string.byte/sub/find.
Date: Tue, 10 Mar 2026 10:29:05 +0300	[thread overview]
Message-ID: <208fb058-9dbb-469c-b5e1-6ff3a532e971@tarantool.org> (raw)
In-Reply-To: <c4baa23d8d571ee62801502ec2392b3bcf8aa94c.1772803880.git.skaplun@tarantool.org>

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

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/
> 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>

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

  reply	other threads:[~2026-03-10  7:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 13:42 [Tarantool-patches] [PATCH luajit 0/2] Fixes for recording of string built-ins Sergey Kaplun via Tarantool-patches
2026-03-06 13:42 ` [Tarantool-patches] [PATCH luajit 1/2] Fix edge cases when generating IR for string.byte/sub/find Sergey Kaplun via Tarantool-patches
2026-03-10  7:29   ` Sergey Bronnikov via Tarantool-patches [this message]
2026-03-10 11:07     ` Sergey Kaplun via Tarantool-patches
2026-03-10 12:44       ` Sergey Bronnikov via Tarantool-patches
2026-03-06 13:42 ` [Tarantool-patches] [PATCH luajit 2/2] Fix edge cases when recording string.byte/sub Sergey Kaplun via Tarantool-patches
2026-03-10  9:59   ` Sergey Bronnikov via Tarantool-patches

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=208fb058-9dbb-469c-b5e1-6ff3a532e971@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 1/2] Fix edge cases when generating IR for string.byte/sub/find.' \
    /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