From patchwork Tue May 14 09:57:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1934936 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hmGI9wt0; 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 4VdsJm3Dfpz1ymw for ; Tue, 14 May 2024 19:59:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 37FC23870C38 for ; Tue, 14 May 2024 09:59:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7B56B385E83A for ; Tue, 14 May 2024 09:58:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B56B385E83A 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 7B56B385E83A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715680701; cv=none; b=Gw2pRiNP4dCNVJpgdp7+B+RE4neWxnOOy+sd5gmh4eZSOkeguP7k8L0sAsuY6eqN4m6j30u7UCzWw2eC6S3BPPPTipqVNPF7fP/1MHcJvwAtsKr+qvVxYdBFqQDKjEUoieS2BfSYe4NgrW+NwIN97PBNobeR7ggDvbGiJbwDLzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715680701; c=relaxed/simple; bh=ZgGj7RKJL8hcYCpTUZA9tqqOolpcOpr8BFgPdmLK1GE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ocCJ2quCU7Udc/0LeIaoOKwcHnwdaFETU4e0lUGmEI4zVGiE2mJmDeM1P0nd7dPQDqRf0Hx5hUOyS1pDy6yEicktbRimD+3jWs+Qz60xMYXMJVr+WKRNsicEV7alToRtZXJ7fSJCu5lIHBr2KrIVz85n2Ve0Qd9EIXTX9tpS44I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715680699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8e84M7ebJD8SWdI8L1GwVnIbmCtQXRCgXmPliI/NpY=; b=hmGI9wt0HZ4lF5ApenhtfzCQkIm2beoOe2Gs1AznGhoNGqFtoYO/kssupAH99I+4eHseYw b/EGp8FEB60Ot9f1j9Y7adYVbRnDlURs9rgV8oIFdavdXqvJk2WQxtLyAdo7PAkVffAzS1 2WHUPOtoUYIGb6hd8SwBk2CVbEOmmu8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-214-StzhEf6mMsWay05yzyIrNA-1; Tue, 14 May 2024 05:58:16 -0400 X-MC-Unique: StzhEf6mMsWay05yzyIrNA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 86EA581227E; Tue, 14 May 2024 09:58:16 +0000 (UTC) Received: from localhost (unknown [10.42.28.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5706721EE56B; Tue, 14 May 2024 09:58:16 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix typo in std::stacktrace::max_size [PR115063] Date: Tue, 14 May 2024 10:57:54 +0100 Message-ID: <20240514095815.368805-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 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 Tested x86_64-linux. Pushed to trunk, gcc14 and gcc-13. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/115063 * include/std/stacktrace (basic_stacktrace::max_size): Fix typo in reference to _M_alloc member. * testsuite/19_diagnostics/stacktrace/stacktrace.cc: Check max_size() compiles. --- libstdc++-v3/include/std/stacktrace | 2 +- .../testsuite/19_diagnostics/stacktrace/stacktrace.cc | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace index 92a69a53d98..d217d63af3b 100644 --- a/libstdc++-v3/include/std/stacktrace +++ b/libstdc++-v3/include/std/stacktrace @@ -430,7 +430,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION [[nodiscard]] size_type max_size() const noexcept - { return _Impl::_S_max_size(_M_impl._M_alloc); } + { return _Impl::_S_max_size(_M_alloc); } [[nodiscard]] const_reference diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc index 070c4157471..a49cddfef26 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc @@ -206,10 +206,20 @@ test_pr105031() s = auto(s); } +void +test_pr115063() +{ + // PR libstdc++/115063 + // compilation error: std::basic_stracktrace::max_size() + std::stacktrace s; + VERIFY( s.max_size() != 0 ); +} + int main() { test_cons(); test_assign(); test_swap(); test_pr105031(); + test_pr115063(); }