Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maksim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, sergos@tarantool.org,
	skaplun@tarantool.org, m.kokryashkin@tarantool.org
Subject: [Tarantool-patches] [PATCH luajit v3 3/4] OSX: Disable unreliable assertion for external frame unwinding.
Date: Tue, 28 Mar 2023 03:03:16 +0300	[thread overview]
Message-ID: <20230328000317.33238-4-max.kokryashkin@gmail.com> (raw)
In-Reply-To: <20230328000317.33238-1-max.kokryashkin@gmail.com>

From: Mike Pall <mike>

(cherry-picked from commit be251d9149b386ca0d4b51106be14366c5dbdf14)

`_Unwind_Find_FDE()` will locate the FDE if the pc is in some
function that has an associated FDE. Note, Mac OS X 10.6 and
later, introduces "compact unwind info" which the runtime uses in
preference to DWARF unwind info. This function will only work if
the target function has an FDE but no compact unwind info.
The LuaJIT VM produces compact unwind info entries, so
DWARF's FDE is not found and that assertion fails.

Maxim Kokryashkin:
* added the description for the problem

Part of tarantool/tarantool#7745
Part of tarantool/tarantool#8069
 src/lj_err.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lj_err.c b/src/lj_err.c
index f6200233..975b5621 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -479,6 +479,8 @@ extern const void *_Unwind_Find_FDE(void *pc, struct dwarf_eh_bases *bases);
 /* Verify that external error handling actually has a chance to work. */
 void lj_err_verify(void)
+  /* Check disabled on MacOS due to brilliant software engineering at Apple. */
   struct dwarf_eh_bases ehb;
   ** FIXME: The following assertions were replaced with
@@ -488,6 +490,7 @@ void lj_err_verify(void)
   ** lj_assertX(_Unwind_Find_FDE((void *)_Unwind_RaiseException, &ehb), "broken build: external frame unwinding enabled, but system libraries have no unwind tables");
   lua_assert(_Unwind_Find_FDE((void *)lj_err_throw, &ehb));
   /* Check disabled, because of broken Fedora/ARM64. See #722.
   lua_assert(_Unwind_Find_FDE((void *)_Unwind_RaiseException, &ehb));
2.37.1 (Apple Git-137.1)

  parent reply	other threads:[~2023-03-28  0:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28  0:03 [Tarantool-patches] [PATCH luajit v3 0/4] jit: add exception unwinding Maksim Kokryashkin via Tarantool-patches
2023-03-28  0:03 ` [Tarantool-patches] [PATCH luajit v3 1/4] Handle on-trace OOM errors from helper functions Maksim Kokryashkin via Tarantool-patches
2023-04-05  6:32   ` Sergey Kaplun via Tarantool-patches
2023-03-28  0:03 ` [Tarantool-patches] [PATCH luajit v3 2/4] Disable unreliable assertion for external frame unwinding Maksim Kokryashkin via Tarantool-patches
2023-05-03  9:31   ` sergos via Tarantool-patches
2023-03-28  0:03 ` Maksim Kokryashkin via Tarantool-patches [this message]
2023-03-28  0:03 ` [Tarantool-patches] [PATCH luajit v3 4/4] Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc Maksim Kokryashkin via Tarantool-patches
2023-04-05  5:33   ` Sergey Kaplun 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230328000317.33238-4-max.kokryashkin@gmail.com \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=sergos@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit v3 3/4] OSX: Disable unreliable assertion for external frame unwinding.' \


* 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