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 6401338155C; Tue, 28 Mar 2023 03:04:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6401338155C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1679961894; bh=1CP985cMe2s2qDEQLNYC3M581y4Dg6gXC7p0oTTm3HA=; 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=wNEqCFa4DZwOCxkrmgLl5/xgEE8PmyU8NdJEEdthZveeH+Un7q9Mq6dbLHb9f/S1G fncNmMmJ2hb85u+A4Fa4bvWSYOGt80o8FDTWX+ic/kebz3wTvNBwMLT7iJlDm/kH3c oHb5Zz6on1UywIGga2O7ND5uxxPLx32ySCdnAibM= Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 2C40638155C for ; Tue, 28 Mar 2023 03:03:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2C40638155C Received: by mail-lj1-f175.google.com with SMTP id q14so10776675ljm.11 for ; Mon, 27 Mar 2023 17:03:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679961814; 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=OOlCdMsTXJkDkhf5lLtt1oFYdxMiYuPsiKufdeWqOT0=; b=M6TtdkRQfSJS5mf24DE4gIUsYtF7T7NgwZefp4wlZMdz2V0XGwtSFQBkIbZMFnF4hp EYZ6asQjCN+RXAZSrORFX35fTLN9mvojjJdJMBCj+vN1yAtg1nEq7cCPwi1OLy7+4EGx eu0kMc950qRoN1bKVvwKsh41rvyMZhUlBhvqlC8Gh0holjd7pgWF7BrEYt9vIbCYaFOc eaLCqAhd7ks0McXtfhf/C09IVWsJIZwuwBZ6NpCdjYdnTsNX+JoTV0HM8JqYUJIZH7Ql lMtr9rDTmDR1xSHKR+8vD1JHUjoSXDUgzAX+WqXOZoiTjhBUHgp2u1CIpjOzvdcP/MFQ 2BiA== X-Gm-Message-State: AAQBX9fn35HfUDktJN7ZOu5vqug9HVXFHi6gc0g1yXE5XseMvqIdpOZE Jgq25FmQ4MlhM6znt0BSQCpHhKWQFgk2fw== X-Google-Smtp-Source: AKy350YXGL1GTEJHDwCBZraBohlPpnT7+YDRlssjZ0yp+9cW54gD9tADjNM7RkwcrluW6CjpG8gBgA== X-Received: by 2002:a2e:6e15:0:b0:295:9f20:bcdf with SMTP id j21-20020a2e6e15000000b002959f20bcdfmr4442124ljc.9.1679961814155; Mon, 27 Mar 2023 17:03:34 -0700 (PDT) Received: from localhost.localdomain (89-179-106-78.broadband.corbina.ru. [89.179.106.78]) by smtp.gmail.com with ESMTPSA id x9-20020a2e7c09000000b00298a81f5d70sm4837508ljc.136.2023.03.27.17.03.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Mar 2023 17:03:33 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, sergos@tarantool.org, skaplun@tarantool.org, m.kokryashkin@tarantool.org Date: Tue, 28 Mar 2023 03:03:16 +0300 Message-Id: <20230328000317.33238-4-max.kokryashkin@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230328000317.33238-1-max.kokryashkin@gmail.com> References: <20230328000317.33238-1-max.kokryashkin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit v3 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.37.1 (Apple Git-137.1)