]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge libcxxrt commit 45ca8b1942090226ba9368caeeeabc0d4ee41ad6
authorDimitry Andric <dim@FreeBSD.org>
Tue, 19 Apr 2022 16:11:11 +0000 (18:11 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 19 Apr 2022 20:23:20 +0000 (22:23 +0200)
commit07bbb50f59ae4c42ab82c11ccda7b25aeea4f7d7
treea1fd6a18424cad19af4958b334598759c29223f1
parent5f649725da97c05329f8e37eb0fd4fba0f289b43
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