From nobody Tue Apr 19 18:20:37 2022 X-Original-To: dev-commits-src-branches@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 3F28111DCD57; Tue, 19 Apr 2022 18:20:38 +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 4KjXD61LZqz4Td6; Tue, 19 Apr 2022 18:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650392438; 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=fBbZ+tTbkiej2alKu7eSYNv7ZhfxDvzV/hPsRfzr7mM=; b=J2V8nYihUD5AGILcEGplAVxu5Pove2kLyS8PdOPj5weJNfgPYPhflt+yAxvD6w/DuD1A6m RR+mfohRlM6n1B3OXH4BJiJpctR6cEivAGntWkyCdv4fQRI1XGYGC1KVSBYV4JnnpTbGgM NV65oh3XUMcjQ2Q0bPEtuSjG2h4bxaKR7uvLdARUxaEmzprGy21ZNEssTA4jS7C3Jm0Yrj 2/dz7KDzMaPhNkStT2xEV4gMIS7NmYy1nU/0Ocp225pI+vEIq5eJut9vY+qQjCDRMGYc7v MuvLGWCc0uBy+Ywa828yH/9/EPVGkN3CA6zysQebDGbi73hURlc3gMZza73tBw== 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 0EC502C2D7; Tue, 19 Apr 2022 18:20:38 +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 23JIKbGW089796; Tue, 19 Apr 2022 18:20:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23JIKbXE089778; Tue, 19 Apr 2022 18:20:37 GMT (envelope-from git) Date: Tue, 19 Apr 2022 18:20:37 GMT Message-Id: <202204191820.23JIKbXE089778@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 06394327dd1f - stable/13 - Merge libcxxrt commit 45ca8b1942090226ba9368caeeeabc0d4ee41ad6 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 06394327dd1fd77c66af06f6f89713c5142fe1b2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650392438; 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=fBbZ+tTbkiej2alKu7eSYNv7ZhfxDvzV/hPsRfzr7mM=; b=sBdaWWOOAWdX6c22l1aml5ZQg/WcjlmGV32qqXc1KZGOJq08KupaI/dUCN1fYuLO7/dj+j qnokT5tDvR+Lo4xlC62HyqXSQOKT+PS5IJM1+NSjrUeEq+2vs8wKdUNMTG5rhvnUMrqO2O ZJG8PwLxZ39eeF7r9ttB9x0T5O1CgpYTa6KZ3T2/vRgE/g7eR+IbrFWDn99UeLbPnR9gPG 6n7s7l3/zlw+MGAnE0rbYgW8BDFaGYjGcMODAoqTLTbrr3Du3BZjkB2EoHz6v+Z+pAVV/+ PsY8xwDV5LziRfv9EYteYS/r/0F0UENXvrQqgO9rmW+gZ+kJv4vSlXAbhxMUfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650392438; a=rsa-sha256; cv=none; b=dNVxZxTDCZX1MZScPnDwUuH121XKkx4+QLqAe6IbOsnCOuYsW9KCwgZNoWBotiM2o8OFYN YxJ+XbXnleTIl323hdhBBy5vZ7G15V6mAhpgUUKGiex0UtFyQRgQTZeylsUbaTxpTLh7yP ZRPV90P0I3ttErRJwXnrCV+lLXF8jtjeJGEmjnPMIs8RCNRkBfTVLwGnoXTT4O3CUTan6x ejf1otjNQae3zUudrXGki31YbaPNlHuVikHorbcEndLLWJQY9d4j3IhAx4Pz5WiEcoTCpW ovDxwrv0Amc+TaX/ZQf6N89VaAXEUTZtJ+6o+zbuKCIEldiFL1ac4YGiESbiUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=06394327dd1fd77c66af06f6f89713c5142fe1b2 commit 06394327dd1fd77c66af06f6f89713c5142fe1b2 Author: Dimitry Andric AuthorDate: 2022-04-19 16:11:11 +0000 Commit: Dimitry Andric CommitDate: 2022-04-19 18:19:52 +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 Approved by: re (gjb, early MFC) MFC after: immediately (cherry picked from commit 434215c26da3c6acf2423ab93ff2b41b2d823cc8) --- 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