Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] ARM64: Fix pcall() error case.
Date: Wed, 15 Feb 2023 09:57:10 +0300	[thread overview]
Message-ID: <Y+yCRrP292fK+BH7@root> (raw)
In-Reply-To: <1676425431.818496221@f317.i.mail.ru>

Hi, Maxim!
Thanks for the review!

On 15.02.23, Maxim Kokryashkin wrote:
> 
> Hi, Sergey!
> LGTM, except for a few nits regarding the commit message.

Fixed your comments, the new commit message is the following:


| ARM64: Fix pcall() error case.
|
| Reported by Alex Orlenko.
|
| (cherry picked from commit b4b2dce9fc3ffaaaede39b36d06415311e2aa516)
|
| The `pcall()` assembler preambule modifies `RC`, which is mapped to
| `x28` (the value is N_args * 8), during the check of the amount of the
| given arguments. So, this wrong value being used in the `fff_fallback`
| routine leads to a crash on error throwing, because the Lua stack is
| incorrectly filled and can't be unwound.
|
| This patch adds the additional comparison before taking the fallback
| branch and modifies `RC` only after this branch.
|
| Sergey Kaplun:
| * added the description and the test for the problem
|
| Part of tarantool/tarantool#8069

Branch is force-pushed.

>  
> > 
> >>From: Mike Pall <mike>
> >>
> >>Reported by Alex Orlenko.
> >>
> >>(cherry picked from commit b4b2dce9fc3ffaaaede39b36d06415311e2aa516)
> >>
> >>The `pcall()` assembler preambule modifies `RC` (`x28`) (N args * 8)
> >The «`RC` (`x28`) (N args * 8)» expression is hard to percieve. I suggest
> >reformulating it in a way like «modifies `RC`, which is mapped to `x28`, so
> >it has value ...». Feel free to ignore.
> >>during the check of the amount of the given arguments. So, this wrong
> >>value using in the `fff_fallback` routine leading to a crash on the
> >Typo: s/using/being used/
> >Typo: s/leading/leads
> >Typo: s/on the/on
> >>error throwing, because the Lua stack is filled incorrect and can't be
> >Typo: s/is filled incorrect/is incorrectly filled/
> >>unwound.
> >>
> >>This patch adds the additional comparison before taking the fallback
> >>branch and modifies `RC` only after this branch.
> >>
> >>Sergey Kaplun:
> >>* added the description and the test for the problem
> >>
> >>Part of tarantool/tarantool#8069
> >>---

<snipped>

> >--
> >Best regards,
> >Maxim Kokryashkin
> > 

-- 
Best regards,
Sergey Kaplun

  reply	other threads:[~2023-02-15  7:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 13:01 Sergey Kaplun via Tarantool-patches
2023-02-15  1:43 ` Maxim Kokryashkin via Tarantool-patches
2023-02-15  6:57   ` Sergey Kaplun via Tarantool-patches [this message]
2023-02-15  8:05     ` Maxim Kokryashkin via Tarantool-patches
2023-02-28 12:43 ` Igor Munkin via Tarantool-patches
2023-03-30 17:38 ` Igor Munkin 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=Y+yCRrP292fK+BH7@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] ARM64: Fix pcall() error case.' \
    /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