From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 305EE18B5A0; Mon, 5 Dec 2022 19:12:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 305EE18B5A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1670256726; bh=snk8Ykn8AMjX+YrMlrFFO203Zi/ZyWwsGQzpywEV6q4=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=r4H2Bs8wFFsx5Ak1EcQiAo9HM+76EUFwqGTCSxmeGB2z2OxpgJLiOaQhgDKuRLph7 t7f9DsbNsYHfOVNShJZ90QnFv9C4WccF/PtrzjwgIrSC89brvAMyB2WUW0bObZ3q8h PpFSDWOfbLBzUCembR3Avbl10/869598YENtnSe4= Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [95.163.41.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1AFC2189E01 for ; Mon, 5 Dec 2022 19:12:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1AFC2189E01 Received: by smtp34.i.mail.ru with esmtpa (envelope-from ) id 1p2E4a-006Ri9-HJ; Mon, 05 Dec 2022 19:12:04 +0300 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) In-Reply-To: <20221028092638.11506-4-max.kokryashkin@gmail.com> Date: Mon, 5 Dec 2022 19:11:53 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <6AE72DB6-762B-4FCC-A3A0-431302CA5FBA@tarantool.org> References: <20221028092638.11506-1-max.kokryashkin@gmail.com> <20221028092638.11506-4-max.kokryashkin@gmail.com> To: Maksim Kokryashkin X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Mailru-Src: smtp X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD908190A22B884CF14D4FF7F00E0658D07B8692BAD07FC31CC182A05F53808504048FA630AEFBFA43A4847685DEBECC3574B32941B3FE54908844AE939089A606C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D348F1757F8DFBC5C338F0C2695CFC4E04EE11CA0F1C84A0BD2B5B71A7EF764C53441B7506261956F711D7E09C32AA3244C87022AEE4C5B6C127736BBBCC43638DAB4DF56057A86259F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojniwsktXAgUND2mgltoKjiQ== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE407724DCFF6EDB61611E346B89046B2BEEC9EA0A951FF19AFE519381EE24192DF5555834048F03EF5D4C9A814A92B2E3B1BA4250FC3964EA4964198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH luajit v4 3/8] OSX/ARM64: Disable external unwinding for now. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: sergos via Tarantool-patches Reply-To: sergos Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch! LGTM Sergos > On 28 Oct 2022, at 12:26, Maksim Kokryashkin = wrote: >=20 > From: Mike Pall >=20 > 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 #698. >=20 > (cherry picked from commit 27ee3bcd79b12a0c71f00427ee1a2e486c684486) >=20 > ARM64 interpreter doesn't have unwind info for Mach-O assembler > format, which makes unwinding impossible. Because of that > external unwinding on ARM64 MacOS is temporarily disabled. >=20 > Maxim Kokryashkin: > * added the description for the problem >=20 > Needed for tarantool/tarantool#6096 > Part of tarantool/tarantool#7230 > --- > cmake/SetTargetFlags.cmake | 4 +++- > src/Makefile.original | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) >=20 > 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}") >=20 > 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=3D10.4 > endif > TARGET_STRIP+=3D -x > - TARGET_XCFLAGS+=3D -DLUAJIT_UNWIND_EXTERNAL > + # Ext. unwinding is broken on OSX/ARM64 until someone finds a fix. = See #698. > + ifneq (arm64,$(TARGET_LJARCH)) > + TARGET_XCFLAGS+=3D -DLUAJIT_UNWIND_EXTERNAL > + endif > TARGET_XSHLDFLAGS=3D -dynamiclib -single_module -undefined = dynamic_lookup -fPIC > TARGET_DYNXLDOPTS=3D > TARGET_XSHLDFLAGS+=3D -install_name $(TARGET_DYLIBPATH) = -compatibility_version $(MAJVER).$(MINVER) -current_version = $(MAJVER).$(MINVER).$(RELVER) > --=20 > 2.37.0 (Apple Git-136) >=20