Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin 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] ARM64: Fix pcall() error case.
Date: Wed, 15 Feb 2023 11:05:59 +0300	[thread overview]
Message-ID: <1676448359.420251074@f221.i.mail.ru> (raw)
In-Reply-To: <Y+yCRrP292fK+BH7@root>

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


Hi, Sergey!
Thanks for the fixes!
LGTM
--
Best regards,
Maxim Kokryashkin
 
 
> 
>>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
> 

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

  reply	other threads:[~2023-02-15  8:06 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
2023-02-15  8:05     ` Maxim Kokryashkin via Tarantool-patches [this message]
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=1676448359.420251074@f221.i.mail.ru \
    --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