From nobody Wed Apr 27 13:42:01 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 D2906199275F; Wed, 27 Apr 2022 13:42:01 +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 4KpKfx4D77z4ss7; Wed, 27 Apr 2022 13:42:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651066921; 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=xOItSvwlLY1NXlkxmJojanOcVDF/NZMmu4YzbVardvU=; b=GWOhV9xYa2OhtE7Bpq8sTvOlQzYCdnNxc/v7iwraxF5b9nOwNgkB4YuIfjYjT0vsn6ziJK rI144tpEfCWCWZr6dAiRxPbMdSalCeNoyaanlm3bpBiOhWSMPd7LX1Q3YwqX0Yt7PiuH9G lUAVzrceCltm+w61PRaBkGudoxqFm7Xl8ND5bdnjiTXbdnNXRnCCK71duHtWCwUsur4T5Z 6ZF0XIGBApHAy8prF8d8xmbHOPFwywcSH96YEESzxIxdI4kDpKHKv5BiZ/xauqe98UeSNc 7Jc/D33y0ERnMur3Vws4VDVzVlKx11gvsodSxbzzWHtLYYf52gPFdjqVxFzkYA== 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 466A624F14; Wed, 27 Apr 2022 13:42:01 +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 23RDg1vK085059; Wed, 27 Apr 2022 13:42:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RDg1JP085058; Wed, 27 Apr 2022 13:42:01 GMT (envelope-from git) Date: Wed, 27 Apr 2022 13:42:01 GMT Message-Id: <202204271342.23RDg1JP085058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c40e4349889b - main - 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/main X-Git-Reftype: branch X-Git-Commit: c40e4349889b32500e51e60f9529dbcc080f468b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651066921; 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=xOItSvwlLY1NXlkxmJojanOcVDF/NZMmu4YzbVardvU=; b=yUmIH6xQVBpP4dVn/xCQu/aB/5dyF79ZNaRp1Wx81qUQYw8wzeBBZ/scXsTJOoXkxqOTTq 3QgkzhHGRIpoobUlnhiwqu7iXKoOPAmR3jYEgL0FQcAjSRCp3rD7vhUKjDbs0j3vvlo+73 1Cs19VoND5tHmHv4xgbbRez5oKjD7kUGm+UWBmpS1gRo/OQcislA4Dnoy+vn01JeUbJh8J OTXiLpZOraTY9hdrO8G3+wPFtfqN8qU3PPsj7XRPz8frQUVybEOyp4j/CixfI22eJoy44O N9KqpJx1ZH627tPjod664qQOj80ydz9RJYzFEPNA9gpbq40XtcXtUdIdr12B/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651066921; a=rsa-sha256; cv=none; b=rmc3wOoNQFWooUSubcNIIOsGTmbLStFlWO8vR0n0qok9uqR8eRVDUndC8iOqXYO4s4D4Qw Z/6FVEVQR2yKJDvdWRI29ra3VPRxzgXlkVUN/MGAveCJV81k9/132VNUr/KUXXRGD7LKhM OZ9rc1t4S90I6GgradccwSRdphreNaQSjoNaIOg5Gxk9HJqmkg0oDXvRqq5AbP4Ggq0TlL 4A9lYgEc3s1I7PEhbraIZWZnZmdcjjlZ5yZuPbn7GW9VXZ8MbHUVKJzKgU06UuRpxVLvyH q7P17d7oKpcWd2aB74WjJRTaQWpQuV3B37A69z/5QnwseNWBOUTmeh2PEfeqhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c40e4349889b32500e51e60f9529dbcc080f468b commit c40e4349889b32500e51e60f9529dbcc080f468b Author: Ed Maste AuthorDate: 2022-04-27 13:15:09 +0000 Commit: Ed Maste CommitDate: 2022-04-27 13:41:26 +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 --- 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