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 3727645FC09; Mon, 15 May 2023 12:18:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3727645FC09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1684142280; bh=qb3AA/FoGDgvAjB/3XTE2BOo4ChPeZJHzw+i+IwVqgQ=; 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=so647CKTOz1zo/n9scDpiNcxmHwBqhZpb4QUiuFCZsHXzdnsnWJXlZpDoaUaH3HOg DB/39aY7VC6wl9VnWLPE2BZ1HG256OAQN8LdxwxPRryip0z29o687wt1PV/4UNhH1A Y6MOEZWP15zo/qBIG1Fn5kmk1O5WmbhUCHIeNcCE= Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 C877245FC09 for ; Mon, 15 May 2023 12:16:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C877245FC09 Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2ac82b07eb3so126203551fa.1 for ; Mon, 15 May 2023 02:16:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684142202; x=1686734202; 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:message-id:reply-to; bh=fzTfRaXr6t7rCuk1FD2ZduqUFp4Yesm8hlZwsMXomEE=; b=bhMfSpyQHOGW/oOQZrlr991B3ksmZXMBixKQGLkUyIzkJazUwRUgDkeD3EzTPDvXQU R7sCnWzii0v5nJLBsvMUHZ32PwetAmGCHTqaMABttrlHerCfe+hQzQCB9d5h7S5WfnaR 3DDRuF4hNsW5KvKJfh1oC4Jv4Fkc8flGq/R9n5CeYxCoD9Dp+qWHzE2p2JeYPAew6GnP tqftkMSFs5SRS2z07whunhlNgUaCoEh6BuxhYrrCZ6aEKaq9wiERCFe7Mci3NM6Ct0RL EoosJG+LAgrqdV+uqfxMcDIUIKr8iXp4jtyV+Pk10RixDbWiV5Hoq5klY5KojW1Wi6Gm TG7w== X-Gm-Message-State: AC+VfDwxUQOhGwAIT5Sgc81tS5tlpAepOnH8IYdOdJXKEzeHfwjQxMc4 dBs2arHf4aUwXPAb0gPYP356I/63pa3J9G1d X-Google-Smtp-Source: ACHHUZ68hDXt/rw3ewXT1kV9vSHSK293cBQVE6MgXZtvYbxm/KrXpCfVlYLiuBZHX4cRdDvWO8aSmg== X-Received: by 2002:a05:651c:14f:b0:2ad:275a:44b6 with SMTP id c15-20020a05651c014f00b002ad275a44b6mr6911293ljd.52.1684142201706; Mon, 15 May 2023 02:16:41 -0700 (PDT) Received: from localhost.localdomain ([185.205.79.32]) by smtp.gmail.com with ESMTPSA id a4-20020a2e88c4000000b002ac7c9d2806sm3739607ljk.50.2023.05.15.02.16.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 May 2023 02:16:41 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, sergos@tarantool.org, imun@tarantool.org, skaplun@tarantool.org, m.kokryashkin@tarantool.org Date: Mon, 15 May 2023 12:16:21 +0300 Message-Id: <20230515091622.30232-4-max.kokryashkin@gmail.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20230515091622.30232-1-max.kokryashkin@gmail.com> References: <20230515091622.30232-1-max.kokryashkin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v4 3/4] OSX: Disable unreliable assertion for external frame unwinding. 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 (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) { +#if !LJ_TARGET_OSX + /* 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)); +#endif /* Check disabled, because of broken Fedora/ARM64. See #722. lua_assert(_Unwind_Find_FDE((void *)_Unwind_RaiseException, &ehb)); */ -- 2.39.2 (Apple Git-143)