Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin 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: Thu, 30 Mar 2023 17:38:51 +0000	[thread overview]
Message-ID: <ZCXJK5+n6vvDSDv2@tarantool.org> (raw)
In-Reply-To: <20230210130146.30703-1-skaplun@tarantool.org>

Sergey,

I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in master, 2.11 and 2.10.

On 10.02.23, Sergey Kaplun via Tarantool-patches wrote:
> From: Mike Pall <mike>
> 
> Reported by Alex Orlenko.
> 
> (cherry picked from commit b4b2dce9fc3ffaaaede39b36d06415311e2aa516)
> 
> The `pcall()` assembler preambule modifies `RC` (`x28`) (N args * 8)
> 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
> error throwing, because the Lua stack is filled incorrect 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
> ---
> 
> PR: https://github.com/tarantool/tarantool/pull/8295
> Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-762-arm64-pcall-no-arg
> Issues:
> * https://github.com/tarantool/tarantool/issues/8069
> * https://github.com/LuaJIT/LuaJIT/issues/762
> 
>  src/vm_arm64.dasc                                 |  3 ++-
>  test/tarantool-tests/lj-762-pcall-no-arg.test.lua | 15 +++++++++++++++
>  2 files changed, 17 insertions(+), 1 deletion(-)
>  create mode 100644 test/tarantool-tests/lj-762-pcall-no-arg.test.lua
> 

<snipped>

> -- 
> 2.34.1
> 

-- 
Best regards,
IM

      parent reply	other threads:[~2023-03-30 17:46 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
2023-02-28 12:43 ` Igor Munkin via Tarantool-patches
2023-03-30 17:38 ` Igor Munkin 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=ZCXJK5+n6vvDSDv2@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@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