From patchwork Sat Jun 22 20:18:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengdun Wang X-Patchwork-Id: 1951129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=live.com header.i=@live.com header.a=rsa-sha256 header.s=selector1 header.b=bNMs2vE3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W65DK5SVrz20X6 for ; Sun, 23 Jun 2024 06:19:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 110C4385DDDB for ; Sat, 22 Jun 2024 20:19:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12olkn20801.outbound.protection.outlook.com [IPv6:2a01:111:f403:2c17::801]) by sourceware.org (Postfix) with ESMTPS id 7D6FB3858D39 for ; Sat, 22 Jun 2024 20:19:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7D6FB3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=live.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=live.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7D6FB3858D39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2c17::801 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719087543; cv=pass; b=WrtJg/Ptl3BrVBVBtUk4YmJteOjjjA2SbuZrAjG060RQ9qxdiBZXqMEGWmQa8hqLnH101SJVeHXFyeef2o2M7kxEFd3tmupsOs8eI8b4N7o3NLY1N9RVqUgrOklYJovbPLoJZyNUYxJJf4JOSsk6yLj2cUwKE7BHI0vyGyw2IEA= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719087543; c=relaxed/simple; bh=ORntTWZoxK5yRR0k598mvwd58tadT23KBrkdZKw3lpA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RBFZVWQevp7lgWac0ciri7Vt9/8VoDMMumOPSBfe5ZXkeg7qW4Q7NU55UpuKgZuIqQwrwZNcpl2GsnMmkhPHEbkxEL+ndAFHUcQaaDV4BASB2SiTleJqZUSSBGgtBl5ivNwMmN4x3NDFPec36bLJ/r6XJf4bp1Lbqt04eo4KfwY= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ITODGUTg1tLB+vx7MEdQsSNQWsG1/HwyLN3P7mRpUCyBDf11LMsU6iRgw1kvvhfzFCOuXAtxfbsokIn34gAsbUWlZrofbhkG35zYprssdwTN7sNITkDOeF2HoZZsXoXZa7pwpvCynKohQM4k7HsRKwBZbfVw2ba2CPe6JZj3+rnLhA7mldps2RTt1bin9hMbluW2qfVhjkKtlaGZybHD7++uYqQZIVQbJOu6qoU/saPYQqPdkK/V4WSacbWgWasCA4/ror7i6WYMwgGkb2EibrIqJ5HZEI7zlgqe5pRx+/cahp0AANyHLLDYs8vp3LDnWWAx7NzmHdqAN7PQl5yWjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NX9Oe01SUrOgw7W8ffLSBfK/js9v5nBny14griwKesQ=; b=U0A8YHVt2wuGPKbgpJyh/uetfCCBil1ZFZUVEYDVsPXIY8I+41d/yDRCmaRmfUUZ7rpeWHvg6/43BdCwN10CcVPB1L4P5wEcrOZ7oDzb+CzhC3OLUdk2xoOZxQH5cidKG1A64shr5E+3c6OY4TEpE+llmEeFEq6ZE6JJGLiYibNeJtMdkvxwjRBctPeJCynTJu9WlaR3qEGWMkYa53/XKHlpn7iE0NPtMq2lD2czqVrx/99795m0j0GYJG5IthhODQVkn1YxW4ESamDVK95jswDpsKTxbCkBynk/EKmhQAxUcHdzWJ0HJMW+L40fLEYIp2/dLPpMljcxIo8OMuPn5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NX9Oe01SUrOgw7W8ffLSBfK/js9v5nBny14griwKesQ=; b=bNMs2vE3QQSyiCGFF+2qp0eWei7xKPrk4qe1OopiTShjNP2AH9iDwBt8F94ljKEsGmTGBMj71269PrtAdrfmQHd+EnTwnkHjUpC+GnJrLYayTE/c1RhQtOZuovkKaZ3qc6e/jAe+Op02T/b3IqgN43EUS8P2+BY6AJC76W5RPpKNTVAf40d6Idm1kQAO8YBH+kdRfDa0+YswSFxetLdhhhIN7Z1AjJikzWnmCEsRMdxpy7rn7Xf7rX332/nhJ3kqPjClbj3CSLuh/GQQu6rYXkUIPInnR3+RA6intBR2qIAS/ZUxMFTKGB8RoDhoLKQ7NkIv9BoVptKoyQ3JzqdzQg== Received: from SA1PR11MB7130.namprd11.prod.outlook.com (2603:10b6:806:29f::10) by DM4PR11MB8158.namprd11.prod.outlook.com (2603:10b6:8:18b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.27; Sat, 22 Jun 2024 20:18:56 +0000 Received: from SA1PR11MB7130.namprd11.prod.outlook.com ([fe80::928e:8882:8562:2dd5]) by SA1PR11MB7130.namprd11.prod.outlook.com ([fe80::928e:8882:8562:2dd5%5]) with mapi id 15.20.7698.025; Sat, 22 Jun 2024 20:18:56 +0000 From: Shengdun Wang To: gcc-patches@gcc.gnu.org Cc: Shengdun Wang Subject: [PATCH] libstdc++: Fix --disable-libstdcxx-verbose abi break [PR115585] Date: Sat, 22 Jun 2024 16:18:33 -0400 Message-ID: X-Mailer: git-send-email 2.45.2 X-TMN: [uH/C8bjQpoG95V3dkxZRONvOLM4yH0YvAKaryCiC8uc=] X-ClientProxiedBy: MN2PR06CA0008.namprd06.prod.outlook.com (2603:10b6:208:23d::13) To SA1PR11MB7130.namprd11.prod.outlook.com (2603:10b6:806:29f::10) X-Microsoft-Original-Message-ID: <20240622201833.588221-1-euloanty@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB7130:EE_|DM4PR11MB8158:EE_ X-MS-Office365-Filtering-Correlation-Id: a4df4ac7-df3c-4e04-6072-08dc92f88b29 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199025|3412199022|440099025|4302099010|1602099009; X-Microsoft-Antispam-Message-Info: QUOOLyHvPBnEZOhCsO2zseh3OQmrO+wfrwUFw0q9KfCSQfuzci2FYhsJKkQIfIrjJagseQiH3hun9Ap2gXiPe8mHZC35SSEkTM9WykF9IdKxZueKkr/HoM8BN/JcEiIU3s7puN+ujBx5gbXNnU4/0eHETn4ombtE5GX9SYB/XFKoWLOZMJQhWi/5mOi6zTyfiopFl075pGZJAKC1n1UtBqd7saA1/D90XZRRdgNngG7vsQFbwk8pqMmlh4vbVeyq0S2b/MsKtkOTH3chXcxQibEHpeeOKS1hfRaxbKuV2fQe8Kf1gGWLsoxn419rTrpE6R8XXBek4U5d8UNUbmt1TVURLzx9eQ0LdZiVe2mg6PiVy8wfkupVpICq6qBMs8NtUjEZ+FryJoeftbFd1u9kTWmCwxHXHz2Ud2AYLQskqSCA0Hpsr86PajNdwmVkDLiTYi+WtAaSarbFxN/ttd6pxEhhSDXdzms512iJP9f5S6JFssCqETPnmBxDsmXI1FthV/i5xDsU79tI5CLkuYt0bvafwuIJ18FHVczcP+3dOjMKumSKDQgRzSrEkkryJ8l+YBz62R/LlS2NG8HQ5SUPEXy5TAETRA12p/gsWuVXxMfeM7LWarJVfiNH87P59uvC4iq2yZlxIuuZHdTPjeIZSp7r+k2WNw+ObY9/mlUd4B8Kq6UEMccIiEc7eISCWJB/ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YfMkz/H7+mFjorN2gDIcR6k3dA/1IG8BP7ykrPpV94QhNbe2dwnSq/glEcKuDVRqxseri+9xKsEHGMCZqgRn/hBZK8i4wtlO7Yg+sxJHssFsOJ4RvsGCOepivImub3BXGWhULxxApnxQnSlZVDMFMKzZqATS2816EymwoF/ZiuUsVC5/9GgMsUrVtvNuciFK65JV2bQylj7EJFW/hK9WPzQzAiwqdfiH5A7ZFQ+DGB0NsZqaNXSkap2oup80N2EHv4le1syBRYpNQOXoGal18SlcyWu0xH51D4lFui8Q+N+M7h9yTpyt0nKpZ7c44OwP85zKdHwImXmVghSBNQ/uWyl/GFMJWbyYsdEysoC8YrlY6joxfmpB1o71B+rJEDKwkzM014brUhJnoA15VHaYw5/xvnkGsgUA4//tuobKTCFPZlqC5b+81FMabjvd8/+8klWZpLAFmhtfwMM3sHU52+8tfD0LlORAf/opackwEZPqN9qQb0NPIVfhlCeKF2HuENDmzQgHzwpVlSQmMX/i1c5/slKahIS07cm1R5VSzojkO+T/MLS2uI37i5ywhGOppy8z5Vf8aV+3TjVOsJksjcPKCAT+2WQgzKXzC4OUc0q8CXgLsh/RmJntnHkPhaswGc3IJCskMf4OIxWSU0HLt7R9opoVzklmtA+zKm8I5gjoAisXK6dbvzqfy++wjX01ppY6ZhOujfHAWs7dkFxrg08juRz1/1VzKfuNmn7yS06ZTYvqzuOGWd3q4BTBolCj2Ve6EkTVPqHat3VovycaC8tMNBNSt4bv03MQBFM/wxVKAO6QgGAZ0chwwkxNU0Nf+x+0tZcJDsjo+3KY54ll0ds58amAMLEh96o6J0dT/jm9wRda1iR/MKZkZUGWRmbEphOCwr1deDX/SMPP6B7zgisJaMPD26Wvq6MrJpa337WhcjcgrH4yoes6XtpiXf4A4qwZPbgNumWidnD/w2FQYQbLPq52j7BB8uxLeq1uE9lMkE4B/KUu4pypRMzyrOpQ0UKoraBgRRNxdK9FtdUjrF6NLr1l5R65sCCYlT0Q79DeBNLyCRvAnsn1YndTAsJn2JWs2Ide7b3au6jS6udCrKczri7yOtjb5mgf/HmCikjBbwtdkQ0fQhZaPDa9/UksqezsoJXjlTKmnlkK4DVa6gDdl2SWKTD5xzpgcxe/ZAE24Bel4lNoBQwHDgtfQpoowAnKbsMtZwfZlfh4iYo1IJDEwIZ+iFT6Cy08kdQWgEA= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-e8f36.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: a4df4ac7-df3c-4e04-6072-08dc92f88b29 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB7130.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2024 20:18:56.6308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB8158 X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Shengdun Wang __glibcxx_assert_fail is not defined when we disable the libstdcxx-verbose. This causes ABI break when a binary is compiled with verbose enabled. libstdc++-v3/ChangeLog: * src/c++11/assert_fail.cc: --- libstdc++-v3/src/c++11/assert_fail.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/src/c++11/assert_fail.cc b/libstdc++-v3/src/c++11/assert_fail.cc index 6d99c7958f3..9ea57ff7e1b 100644 --- a/libstdc++-v3/src/c++11/assert_fail.cc +++ b/libstdc++-v3/src/c++11/assert_fail.cc @@ -22,23 +22,28 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . +#include +#ifdef _GLIBCXX_VERBOSE_ASSERT #include // for std::fprintf, stderr +#endif #include // for std::abort -#ifdef _GLIBCXX_VERBOSE_ASSERT namespace std { [[__noreturn__]] void - __glibcxx_assert_fail(const char* file, int line, - const char* function, const char* condition) noexcept + __glibcxx_assert_fail( [[maybe_unused]] const char*, + [[maybe_unused]] int line, + [[maybe_unused]] const char* function, + [[maybe_unused]] const char* condition) noexcept { +#ifdef _GLIBCXX_VERBOSE_ASSERT if (file && function && condition) fprintf(stderr, "%s:%d: %s: Assertion '%s' failed.\n", file, line, function, condition); else if (function) fprintf(stderr, "%s: Undefined behavior detected.\n", function); +#endif abort(); } } -#endif