From nobody Wed Apr 27 17:55:23 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2E7FB1AAE215; Wed, 27 Apr 2022 17:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpRHJ0nCpz4kbb; Wed, 27 Apr 2022 17:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651082124; 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=4GJZGRxYRSCzk7Zt+f2C1F04/0sGRXUUw5Lj+5AWts4=; b=AxuJvXd89eKPmkn6hIq8zDlAVRD7Wh8xx8beI1e/eNh0tw1t6SWdzPoLneXXJzXEOSRfG8 4onqeqKhE2shTg5owuL+2pqqzOjr3jKl82WP1oWN0Pxwc7zmv+IufruDOosQltqRmg9Pvr nH1+OaI3bzBgUoBM1FW/BmEP3Fex8t+CY2caOmQJ43AXs5aLfeJF+KMY5cAIoVWOs4sMye wQhZIomMsgjb5pb2868pSj6dpOs0JBPfjRz5XpL5xsplHKEB17kgWUxoTQdYvcJ7TJVDfE j2etQXD/UJFlzo3j0qFyPjszfXIpznbX9VUy3aGa0PJ1RH0MNcPlqYP46F3pVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB89D9A6; Wed, 27 Apr 2022 17:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23RHtN08025210; Wed, 27 Apr 2022 17:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RHtNoc025209; Wed, 27 Apr 2022 17:55:23 GMT (envelope-from git) Date: Wed, 27 Apr 2022 17:55:23 GMT Message-Id: <202204271755.23RHtNoc025209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 346f0084ba72 - releng/13.1 - libcxxrt: Insert padding in __cxa_dependent_exception List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 346f0084ba726f5b4640e0624c6f7e0df2622d54 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651082124; 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=4GJZGRxYRSCzk7Zt+f2C1F04/0sGRXUUw5Lj+5AWts4=; b=FE6tavkiRx154AOHeICKdmAZpZqwC+mYOe8SH9Px2t5bg4zLrVmr1AlixAzuL5ysFsdQ8y ABeKgWRA2JA7fQrnrXo2BW+U6Bo/pb5tgVbcAghzWGXgf7dFKFpTlzsWXfDoOPPu7C878v 2bC7pb45Np/R3riav/6JZkhhVU+yzDdxk7fn7yS3f3P/93bq+H7hNaVdjqlZYkajvEMx7b Kb3ch1lLC0H5FuKHJTbnMH4l6i3pvLulBl5lKVfoKR9ufM/QMR0EznUG8Wb3rcnbrTDgsZ ySxmpO+RDyjeNNeyC53otQ933MbuThUMyEAe+nZ+0a6OnGjNvr/LCj/iuXsBIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651082124; a=rsa-sha256; cv=none; b=txYGreIaLwl3DzPTnCy+NZ1C4Sr3ijXm0fT88E8t6rCcWKaMe4c4bc4LjpTXem0x4nT79+ TwDm2uK1jP4n+7LVKqhdyUa7Rixlk7Gjdkw6vxRD4cVZfqDSBMRGw5WO+DpD2oqAWZWH5u TBhIfGcWJXgrUZcQGkpI/IjXOXq0HjgV3/UCFAitCsdZdYnEI8kMiJFtYhZgRBcJKDlVn+ wjTM77fHB0TVgcm9XBn9RsAcp7Htf5+p5I4UlIUhkvkh7uCCBuBw2ltvv5ZKtGkZWdXzfQ nhJFYg+r4PD5h2ef9JMYruklIWWAnU5zijUUMAvUAXqP1gv68HVcki5cordQ7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=346f0084ba726f5b4640e0624c6f7e0df2622d54 commit 346f0084ba726f5b4640e0624c6f7e0df2622d54 Author: Ed Maste AuthorDate: 2022-04-27 13:15:09 +0000 Commit: Ed Maste CommitDate: 2022-04-27 16:05:34 +0000 libcxxrt: Insert padding in __cxa_dependent_exception Padding was added to __cxa_exception in 45ca8b19 and __cxa_dependent_exception needs the same layout. Add some static_asserts to detect this in the future. Merge of libcxxrt commit b00c6c564357 (cherry picked from commit c40e4349889b32500e51e60f9529dbcc080f468b) (cherry picked from commit 69a40d924128b88ff2c82a35ab1b4509e1bdca56) Approved by: re (gjb) --- contrib/libcxxrt/exception.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0fb26ddb4ed2..f2b5fc0808ac 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -196,6 +196,7 @@ struct __cxa_thread_info struct __cxa_dependent_exception { #if __LP64__ + void *reserve; void *primaryException; #endif std::type_info *exceptionType; @@ -218,6 +219,17 @@ struct __cxa_dependent_exception #endif _Unwind_Exception unwindHeader; }; +static_assert(sizeof(__cxa_exception) == sizeof(__cxa_dependent_exception), + "__cxa_exception and __cxa_dependent_exception should have the same size"); +static_assert(offsetof(__cxa_exception, referenceCount) == + offsetof(__cxa_dependent_exception, primaryException), + "referenceCount and primaryException should have the same offset"); +static_assert(offsetof(__cxa_exception, unwindHeader) == + offsetof(__cxa_dependent_exception, unwindHeader), + "unwindHeader fields should have the same offset"); +static_assert(offsetof(__cxa_dependent_exception, unwindHeader) == + offsetof(__cxa_dependent_exception, adjustedPtr) + 8, + "there should be no padding before unwindHeader"); namespace std