From nobody Tue Apr 19 16:13: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 8C6D411E5E0A; Tue, 19 Apr 2022 16:13:02 +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 4KjTNt198dz3PgN; Tue, 19 Apr 2022 16:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650384782; 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=gginjZ6LGL9u07z36FmxkT6dX/UQk9Ub9oivIBkE7UA=; b=w2IjQsI9+XPuW2ihuQjNf/3H9doVyXXDcgI6MI+JIOgBpgdPZ3rBxI1YZq+3SpB67nvy/0 kbS7RqRfGcR7IUMtrEiuvbMirNIsFpwDKt+KwBEMaFd4SxRGUxJHhuFCN7+4ID/SlR3Wuc BdzrYHuG9p4JnZRiWbaihcwU8hlzV6vzvAhW8vuKsFtDpj79l8xh1J2cFutpEEmJ+cSilX VzN87E28QIupAsBVtDeX72IChnXSRI83qQmX8hS6VsvSoNAaa6KmzMoBlQ2vhnSyNz6GY9 djlxjoc22YvQ95RZgjD15Ck4YLvJ4O/OTYMah6S+v38rEap7BXAEeLVtVp385w== 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 EB7722AA07; Tue, 19 Apr 2022 16:13: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 23JGD1sk016854; Tue, 19 Apr 2022 16:13:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23JGD17I016853; Tue, 19 Apr 2022 16:13:01 GMT (envelope-from git) Date: Tue, 19 Apr 2022 16:13:01 GMT Message-Id: <202204191613.23JGD17I016853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 434215c26da3 - main - Merge libcxxrt commit 45ca8b1942090226ba9368caeeeabc0d4ee41ad6 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 434215c26da3c6acf2423ab93ff2b41b2d823cc8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650384782; 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=gginjZ6LGL9u07z36FmxkT6dX/UQk9Ub9oivIBkE7UA=; b=BiNN7ER/pZWepE0IIGanD7KsVYZhLA5Isjapx4Kt2Xj+ocvqt8G1KngR/nZJ6aO3t0sshn b2Pyq0VW+Nb45nVoCd7eUsxiE2Q2y0lRaWjFcMSzfvBx0V99/xBrelRxCZ1RnOjDAC5LfQ NJM0IvVEe6wxMkuFxHNIdqr1VXdz0hOwzCBPdlw/Zwtq3DnNJ/F2pzTWz1yu1+6c5E0w1b zogGnT1+171JMLY0EAXN1V2ncfs8IICOvLh20L5p8/KBXEBFRieFzQ63fsj4k2pFpukruP 2JfnLPCWWHrgt+lkuY7yYSH7aRQo4XZbUL0BJKnli4lAZ/0RY738fVWvjKXvhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650384782; a=rsa-sha256; cv=none; b=usLoqFK0HhgmJozEKmjSQ/Klub5E1YB2XVG/1HWypo7MviCEOHAFO2ZfFtsI1csK+QEbec tj4FCrurEYfu9dMNHrrzcAkK8nU75UnzqEq0cOcsSOHKSYcQFxlrEDCvavZ4bnq4ZvImOJ xh4GbK+uEX7wuaPAs9IZaoyD/qKV3A1Wn8AZ0evHrsqEpcxKhXgVkDW/XfgMod2ag7keb5 Zy4UQ8OVrvfBBMAcOeGmn5DhKNBjNO3eFH++0PkjhJRKxKkYHW2Px/SC+Z8RS/MijC7/tC nFF2PZtEJHB/k7AEKQ4We7ZPPByd4Oc8P3TS6wJ2G6qUizC1zG7/eJRVzwWWHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=434215c26da3c6acf2423ab93ff2b41b2d823cc8 commit 434215c26da3c6acf2423ab93ff2b41b2d823cc8 Author: Dimitry Andric AuthorDate: 2022-04-19 16:11:11 +0000 Commit: Dimitry Andric CommitDate: 2022-04-19 16:11:11 +0000 Merge libcxxrt commit 45ca8b1942090226ba9368caeeeabc0d4ee41ad6 Insert padding in __cxa_exception struct for compatibility Similar to https://github.com/llvm/llvm-project/commit/f2a436058fcb, the addition of __attribute__((__aligned__)) to _Unwind_Exception (in commit b9616964) causes implicit padding to be inserted before the unwindHeader field in __cxa_exception. Applications attempt to get at the earlier fields in __cxa_exception, so preserve the same negative offsets in __cxa_exception, by moving the padding to the beginning of the struct. The assumption here is that if the ABI is not aware of the padding before unwindHeader and put the referenceCount/primaryException in there, no padding should exist before unwindHeader. This should make libreoffice's custom exception handling mechanisms work correctly, even if it was built against an older cxxabi.h/unwind.h pair. PR: 263370 MFC after: 3 days --- contrib/libcxxrt/cxxabi.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/libcxxrt/cxxabi.h b/contrib/libcxxrt/cxxabi.h index 411c4c749ccf..e843599c66da 100644 --- a/contrib/libcxxrt/cxxabi.h +++ b/contrib/libcxxrt/cxxabi.h @@ -77,6 +77,13 @@ typedef void (*terminate_handler)(); struct __cxa_exception { #if __LP64__ + /** + * Now _Unwind_Exception is marked with __attribute__((aligned)), which + * implies __cxa_exception is also aligned. Insert padding in the + * beginning of the struct, rather than before unwindHeader. + */ + void *reserve; + /** * Reference count. Used to support the C++11 exception_ptr class. This * is prepended to the structure in 64-bit mode and squeezed in to the