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 3AE2A6F3C8; Thu, 6 Oct 2022 12:50:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3AE2A6F3C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1665049835; bh=ON6/+eoScaLPHqZrRIXqsy2T+qnbrbHDdOP9gQ9411c=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=WxTMbww8asvE1pcuZbj9vLTK+9+fI0ZLxlmqjwySlnXlNQZFSaeZDk8mzUZJM5zKj semp1FEoopwjRiysZ0UnR2/NIQ9jihMkXIGTIcmTCeM8AQaiyVAx42Oez2jZy2jdOw 4IkbwbnZUdXkUQykiJXfF93DGF7OViv5lZQ0AfCQ= Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 8D93F6F3C8 for ; Thu, 6 Oct 2022 12:49:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8D93F6F3C8 Received: by mail-lj1-f181.google.com with SMTP id r22so279749ljn.10 for ; Thu, 06 Oct 2022 02:49:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ISyC0Nb1KcyHFQf6So1vQjM4HyOSp1FUYXPoMjzuenk=; b=nE9mbuIBpeC7Lwp2TifZ5kc3OjKRmEcZ1X/cuk7OzcKGMay3aimD1JRyiqn08OVkcR H2yq+ykZGqXsRwyAsC7FUfjhnnSkjF7kr/E84f/aX14KY7+37FSZbRWAeWjJ1VR0BIgd IMM6M0qIZCtsPgbJf2faWeeJel+oYnmZzg7vRgJ0EWelpn0vu5Tsy23fLlobpNIQh6oK bSrncFyNm6pDklv7lTp+WImkrdiE/XVLJg06dJ6PtOvR6aCcCpoYChGcRD45BeR2ANnf voWCJrXeHRsFxbZxaapaD5swiMgmAODpTySMeDEcgnPaVLYiUMd8bDuXKHdCB0Q+7KJ2 f4Dg== X-Gm-Message-State: ACrzQf1gFkJj+vC3zAX7+MNASWLHN+Q+D9FgHfM/rK6qqTq81xtrYE+i 4T7KMkSeEDfCRrn/FBjQpbZCTmnjdzXmvS35 X-Google-Smtp-Source: AMsMyM6s6Z/Et6pZRvUGIPVYM0+hrg7hqZ/wyGRHlKcYo5pmF2WKbO6b1UHaIm2zr9XFQgclhGepjA== X-Received: by 2002:a2e:9910:0:b0:26d:fdf5:dd20 with SMTP id v16-20020a2e9910000000b0026dfdf5dd20mr1425483lji.512.1665049742656; Thu, 06 Oct 2022 02:49:02 -0700 (PDT) Received: from localhost.localdomain (128-69-252-100.broadband.corbina.ru. [128.69.252.100]) by smtp.gmail.com with ESMTPSA id o20-20020a056512231400b004979ec19380sm2628676lfu.285.2022.10.06.02.49.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Oct 2022 02:49:02 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, sergos@tarantool.org, skaplun@tarantool.org Date: Thu, 6 Oct 2022 12:48:46 +0300 Message-Id: <20221006094849.85442-4-max.kokryashkin@gmail.com> X-Mailer: git-send-email 2.32.1 (Apple Git-133) In-Reply-To: <20221006094849.85442-1-max.kokryashkin@gmail.com> References: <20221006094849.85442-1-max.kokryashkin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v2 3/6] 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: Maksim Kokryashkin via Tarantool-patches Reply-To: Maksim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Mike Pall 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. (cherry picked from commit 27ee3bcd79b12a0c71f00427ee1a2e486c684486) 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. Maxim Kokryashkin: * added the description for the problem 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(-) 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)