From: sergos via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maksim Kokryashkin <max.kokryashkin@gmail.com>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 3/6] OSX/ARM64: Disable external unwinding for now.
Date: Tue, 4 Oct 2022 11:26:02 +0300 [thread overview]
Message-ID: <CE631C33-C536-4EA0-893D-DA2CCA1A8DC8@tarantool.org> (raw)
In-Reply-To: <1d15f0a9f3865b0ec374d66d01f38d055afc9eec.1664207262.git.max.kokryashkin@gmail.com>
Hi!
Thanks for the patch!
I would rephrase the original message, so that it’ll be clear that changes
are arm64-related only.
Otherwise LGTM.
Sergos
> On 26 Sep 2022, at 18:55, Maksim Kokryashkin <max.kokryashkin@gmail.com> wrote:
>
> From: Mike Pall <mike>
>
> This reduces functionality, e.g. no handling of on-trace errors.
> Someone with very deep knowledge about macOS and MACH-O/DWARF stack
> unwinding internals is needed to fix this. See issue LuaJIT/LuaJIT#698.
>
> (cherry picked from commit 27ee3bcd79b12a0c71f00427ee1a2e486c684486)
>
> ARM64 interpreter doesn't have unwind info for Mach-O assembler
> format, which makes unwinding impossible.
>
> For more info, see https://github.com/LuaJIT/LuaJIT/issues/698
>
> Maxim Kokryashkin:
> * added the description for the problem
>
> Needed for tarantool/tarantool#6096
> Needed for tarantool/tarantool#7230
> ---
> cmake/SetTargetFlags.cmake | 4 +++-
> src/Makefile.original | 5 ++++-
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake
> index a5a3407f..d99e1f9a 100644
> --- a/cmake/SetTargetFlags.cmake
> +++ b/cmake/SetTargetFlags.cmake
> @@ -16,7 +16,9 @@ LuaJITTestArch(TESTARCH "${TARGET_C_FLAGS}")
> LuaJITArch(LUAJIT_ARCH "${TESTARCH}")
>
> if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
> - AppendFlags(TARGET_C_FLAGS -DLUAJIT_UNWIND_EXTERNAL)
> + if(NOT LUAJIT_ARCH STREQUAL "arm64")
> + AppendFlags(TARGET_C_FLAGS -DLUAJIT_UNWIND_EXTERNAL)
> + endif()
> else()
> string(FIND ${TARGET_C_FLAGS} "LJ_NO_UNWIND 1" UNWIND_POS)
> if(UNWIND_POS EQUAL -1)
> diff --git a/src/Makefile.original b/src/Makefile.original
> index d1373b40..5826a56a 100644
> --- a/src/Makefile.original
> +++ b/src/Makefile.original
> @@ -325,7 +325,10 @@ ifeq (Darwin,$(TARGET_SYS))
> export MACOSX_DEPLOYMENT_TARGET=10.4
> endif
> TARGET_STRIP+= -x
> - TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
> + # Ext. unwinding is broken on OSX/ARM64 until someone finds a fix. See #698.
> + ifneq (arm64,$(TARGET_LJARCH))
> + TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
> + endif
> TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC
> TARGET_DYNXLDOPTS=
> TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)
> --
> 2.32.1 (Apple Git-133)
>
next prev parent reply other threads:[~2022-10-04 8:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 15:54 [Tarantool-patches] [PATCH luajit 0/6] Fix external unwinding on M1 Maksim Kokryashkin via Tarantool-patches
2022-09-26 15:54 ` [Tarantool-patches] [PATCH luajit 1/6] Cleanup and enable external unwinding for more platforms Maksim Kokryashkin via Tarantool-patches
2022-09-28 8:20 ` sergos via Tarantool-patches
2022-10-03 7:36 ` Sergey Kaplun via Tarantool-patches
2022-09-26 15:54 ` [Tarantool-patches] [PATCH luajit 2/6] OSX: Fix build by hardcoding external frame unwinding Maksim Kokryashkin via Tarantool-patches
2022-10-03 10:54 ` Sergey Kaplun via Tarantool-patches
2022-10-03 15:58 ` sergos via Tarantool-patches
2022-09-26 15:55 ` [Tarantool-patches] [PATCH luajit 3/6] OSX/ARM64: Disable external unwinding for now Maksim Kokryashkin via Tarantool-patches
2022-10-03 11:08 ` Sergey Kaplun via Tarantool-patches
2022-10-04 8:26 ` sergos via Tarantool-patches [this message]
2022-09-26 15:55 ` [Tarantool-patches] [PATCH luajit 4/6] ARM64: Reorder interpreter stack frame and fix unwinding Maksim Kokryashkin via Tarantool-patches
2022-10-04 15:48 ` sergos via Tarantool-patches
2022-09-26 15:55 ` [Tarantool-patches] [PATCH luajit 5/6] OSX/ARM64: Disable unwind info Maksim Kokryashkin via Tarantool-patches
2022-10-04 15:52 ` sergos via Tarantool-patches
2022-09-26 15:55 ` [Tarantool-patches] [PATCH luajit 6/6] OSX/ARM64: Fix external unwinding Maksim Kokryashkin via Tarantool-patches
2022-10-04 16:05 ` sergos via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 0/6] Fix external unwinding on M1 Maksim Kokryashkin via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 1/6] Cleanup and enable external unwinding for more platforms Maksim Kokryashkin via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 2/6] OSX: Fix build by hardcoding external frame unwinding Maksim Kokryashkin via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 3/6] OSX/ARM64: Disable external unwinding for now Maksim Kokryashkin via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 4/6] ARM64: Reorder interpreter stack frame and fix unwinding Maksim Kokryashkin via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 5/6] OSX/ARM64: Disable unwind info Maksim Kokryashkin via Tarantool-patches
2022-10-06 9:48 ` [Tarantool-patches] [PATCH luajit v2 6/6] OSX/ARM64: Fix external unwinding Maksim Kokryashkin 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=CE631C33-C536-4EA0-893D-DA2CCA1A8DC8@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=max.kokryashkin@gmail.com \
--cc=sergos@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 3/6] OSX/ARM64: Disable external unwinding for now.' \
/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