From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4DDC9386182A for ; Tue, 25 Jun 2024 12:57:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DDC9386182A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4DDC9386182A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719320241; cv=none; b=vvo0v0rOrIkXpG/sf4esrV5onlyAIGVJnUxtOMLLSsLbhlQ3pJ94/Qn1FOpvejd50oV+Eg2MAOIyDJdO1CQy4rW/6kwhHaO0i4kvv04dnND2Oa0FRKx68m4bJBtqxfnH8FJ2Z0lQKoBRPecR1bVvRircT8+mIZBinEWDS7C9b7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719320241; c=relaxed/simple; bh=W6pkRofJvZIcTj5+3ttY5VGyOYHODZFnPwU+Dcr/40k=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Shvyu2++zlL53ybHPDfmzvX4pGP2ANVVHDw3XPxwfkzecJHeI43iNI9k7uZemh5sdwpfgDSfKvFj5nqvtg9RlYHld2H/hlui6XwAzCBEcaBeWB8Qvvs0yb9aAhP6KHuOBQmkJyUzMbJMWya2lahoKGx8IvByChW8C9HNHVog1ig= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719320236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jAV3WW/BkygV2WxaLKX/QjiC6DQuk8p/XQ5TGFZbhcQ=; b=dQD8tbGXlOOJXYCrGwKO0Wc5qWf152GfjtRBLWd3/1wtBhNuqQ+w7ogMcN8fhFiwbIptDz TAGlOS37C9unR6e/neiJNaGsqCB3YvkBagd+1TgbQYCE0h8b8kkzkyE9l7+mpyWCDQE4rk N/Oz7zhNTih6a4S3/XXbn911V3LMJMs= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-379-cGXGgkUMOha3eTds95PfWQ-1; Tue, 25 Jun 2024 08:57:14 -0400 X-MC-Unique: cGXGgkUMOha3eTds95PfWQ-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 71D6D19560B8; Tue, 25 Jun 2024 12:57:13 +0000 (UTC) Received: from localhost (unknown [10.42.28.182]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 821051956050; Tue, 25 Jun 2024 12:57:12 +0000 (UTC) Date: Tue, 25 Jun 2024 13:57:11 +0100 From: Jonathan Wakely To: Shengdun Wang Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Fix --disable-libstdcxx-verbose abi break [PR115585] Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,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 List-Id: Please read https://gcc.gnu.org/contribute.html#patches and ensure you've included everything, for example ... On 22/06/24 17:11 -0400, Shengdun Wang wrote: >__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: This is missing a description of the change. The PR number should be in the summary line, and the ChangeLog entry. Patches for libstdc++ should be CC'd to the libstdc++ list: https://gcc.gnu.org/lists.html No DCO sign-off: https://gcc.gnu.org/contribute.html#legal >--- > 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..930cabd5ee6 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* file, >+ [[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