From nobody Tue Apr 19 20:24:00 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 4782111D2881; Tue, 19 Apr 2022 20:24: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 4KjZyT24hWz4mLH; Tue, 19 Apr 2022 20:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650399842; 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=ByFpOIW7aydS4gIrxc6IRRGc2flj5vFbuJPcXsaIqGc=; b=ylQLBt8OjbHeALazftFiUGZOhUZ08/EyXewtYH1xofGpSXNioSPb6wXkwLQz3m/9Za91rK NDhQLWp7Bm0Kd+6yNo94WieKleobjRBjiUSZ+2DfGbK5OTI3kVkFAQAmXXuRqwW4IR/qDc d9b2O5B3dGoQ3kDnjEKaRhuzSssyrdbYlCEbINjAmKMJb3Kwe2CROyW3GRHEIiyP6h3g9D TOP8SxKu+47K+5KjPfM/+DkhoI0UY+iqK2u4nxUSbOQcYQSYLTp031XODE235tnVUxdgQW 5extvq0cQwUYmoXFwWrnKhnBQ97TrjSTs/QzsNRjNfF2JyxzjtdEog9d6zIduA== 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 0309B2E115; Tue, 19 Apr 2022 20:24: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 23JKO0PL055143; Tue, 19 Apr 2022 20:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23JKO0qJ055142; Tue, 19 Apr 2022 20:24:00 GMT (envelope-from git) Date: Tue, 19 Apr 2022 20:24:00 GMT Message-Id: <202204192024.23JKO0qJ055142@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: 07bbb50f59ae - releng/13.1 - 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/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 07bbb50f59ae4c42ab82c11ccda7b25aeea4f7d7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650399842; 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=ByFpOIW7aydS4gIrxc6IRRGc2flj5vFbuJPcXsaIqGc=; b=wcCpmHOnCHoNdgDISuUTViuSOkY/FySmOZbQ3hsNzEFMNyKCIaWCct93Lvj1hIrieC3QGB 0uqOp53cwqEidX+ZbdthSz2mYFeIODgdkQGW1mQl3RJP9MQctTFgFEeDiLq0X8fhDC4Mp/ qRy2uKCNDwvjBCL5nz/IUUH1XoHIJ16YmwFLFdSDRbCuEwoODPENcXgmdpvxDnAoIebzFI daE9Z6Q7IJ/a31q1hMXInIKHCPHzPzXaoYWKmNPRTcKsMwq2ipGrPtoLvbpMJgcr1/8geh +XM3y7iGZqsW5Qk4EzlJQfkywwR34O1GV8Uc9C8Zd07U2JA1HcHSiUqNpl7ooA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650399842; a=rsa-sha256; cv=none; b=Bu32itIxa2mV6J94vB/m/ZhjdCYid01kAvotfj2U2m3lcp7znWvBA7adyNQ8XUyYyEbIgS ngRIjHpoVnR/D4+zjVys3WMQrCMOHQ6Lo3wzjCMpnM7qXrvJecVqKAIYxtk/BjgrTp1VVy J01iZQeGvKiG1hpWvCrYymey5otJHPWqeT/CdrOVw9N8y61lJvhL+waff77wzZZdnv81iN x5WEZiPwD1PUv+ZrUUCUUEdDFn7iUjQpL209C0lKVJjDlA1JQ3ckLK5vO0llUevCWMxiUs uEAayMT0gVeQYAsz+Xuckf2OfsWQFKVKmqdDLYpmc5zfu7kCAO6c8AuDv5BIrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=07bbb50f59ae4c42ab82c11ccda7b25aeea4f7d7 commit 07bbb50f59ae4c42ab82c11ccda7b25aeea4f7d7 Author: Dimitry Andric AuthorDate: 2022-04-19 16:11:11 +0000 Commit: Dimitry Andric CommitDate: 2022-04-19 20:23:20 +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) MFC after: immediately (cherry picked from commit 434215c26da3c6acf2423ab93ff2b41b2d823cc8) (cherry picked from commit 06394327dd1fd77c66af06f6f89713c5142fe1b2) --- 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