From nobody Wed Apr 27 16:05:05 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 6BAE41ABD397; Wed, 27 Apr 2022 16:05:05 +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 4KpNr12bHnz3w1J; Wed, 27 Apr 2022 16:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651075505; 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=7DHyKxFlX9d5IY2SEcoO9U4K96hRxBE4ValDQfDZrOU=; b=q2NMzorI2XtAvbGuymzFHjgs586Xf6jKdsTzjkMrqxlYJNqoldKuzt0CBRXd1D1H1HeFE/ jBS2IcdwOxXk1fMMPIEVtCBAkO4vy4OEy1Gi10H3RrxfA6GCRBKgIXV/pParf7fkRtSi5d 7q8klXAVYJLpSdfgmIwkcgIsVn5wTs3/s0mSSAizgeL/m5fIpqUrNhbZ6GMbQqnBQNCjEi hRI0CZBLOrtINeP3QQB1GOoWkb/hbw0O1rLY2YLXIsLN4m1uEr744SI/NCKQtWVtUVtr/N vmSPkTh25czJUDsjkS7IseUs9erFRpiLVE4viG7GjNJLZC3ulJgzbAHH+dMUBQ== 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 38DCF27187; Wed, 27 Apr 2022 16:05:05 +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 23RG558X075857; Wed, 27 Apr 2022 16:05:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RG55Vu075856; Wed, 27 Apr 2022 16:05:05 GMT (envelope-from git) Date: Wed, 27 Apr 2022 16:05:05 GMT Message-Id: <202204271605.23RG55Vu075856@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: 69a40d924128 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 69a40d924128b88ff2c82a35ab1b4509e1bdca56 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651075505; 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=7DHyKxFlX9d5IY2SEcoO9U4K96hRxBE4ValDQfDZrOU=; b=vDdsuPEBNJi3FH1L9WJKv7phMyir/dQstDIE0Wepm/rUe8sbpmFlEZIvrriRjE4plkjzrX EsenLlptYsegEecne4lNkAGzVvBBr6JvfANtWnmyJx/eVIzkc7w5GSgJWQmY6iZOhFvucj kNHlqF6bPBtmf3b+MzK/FFYGEvWcPKi6WpZT1UKOx5uMtJ45cyKLCjUYJXm+rtdVGDDtZ1 nUeVaYS7RPrWeJzSd0lkDoa/XmRbnpTRB7oL8QqJq0C1RXiZyl4AdRuA8p7fFwMVrqXEqA 2/cxwEVi8ypf9vxQWoi7p1rQFOY6h8AIYDWGSJQL2vYpPXNnf+hfhE1OwkULmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651075505; a=rsa-sha256; cv=none; b=P4tnccuiC0iWc+DM4zV0pMGy2SP1+KDOQTOZ525/K76SoBqo7GF+5ECSXWMy5Vy+jEiFaN 6ZHhgEuJZ2KY21JXSBygqc/a3hjhbzz0deVhtmXzE9g6+UdhlQssX0jtOpLp0rIwIQlkBq 0ZNgiaB3dPYHMCwREBYRYjL02JMSYvMJ4/MZaJdpgrQchp3hgIYu+HFoOvGA6lDwhz5ZTs q5Xw0knNm0gypL56bO/jQ2nycsYqgduxUYyNsWMWCo6a0YQ4umpML6bVCh4f3PwC3ni/r7 KhtTzWUqYd2ZfjqwAio9HiS4ObMT/wAju+0mEfanHWBFzvZMld0x23BFQHAshg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=69a40d924128b88ff2c82a35ab1b4509e1bdca56 commit 69a40d924128b88ff2c82a35ab1b4509e1bdca56 Author: Ed Maste AuthorDate: 2022-04-27 13:15:09 +0000 Commit: Ed Maste CommitDate: 2022-04-27 15:29:15 +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) Approved by: re (gjb, accelerated MFC) --- contrib/libcxxrt/exception.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 2f1dc4030ba4..f28082ab7e80 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -197,6 +197,7 @@ struct __cxa_thread_info struct __cxa_dependent_exception { #if __LP64__ + void *reserve; void *primaryException; #endif std::type_info *exceptionType; @@ -219,6 +220,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