Page MenuHomeFreeBSD

Remove compat hacks from libcxxrt's _Unwind_Exception
ClosedPublic

Authored by dim on Mar 8 2022, 10:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 21 2024, 8:34 PM
Unknown Object (File)
Jan 14 2024, 5:51 AM
Unknown Object (File)
Dec 29 2023, 3:48 PM
Unknown Object (File)
Dec 23 2023, 2:47 AM
Unknown Object (File)
Dec 12 2023, 6:40 AM
Unknown Object (File)
Nov 28 2023, 6:39 AM
Unknown Object (File)
Nov 8 2023, 9:25 AM
Unknown Object (File)
Nov 7 2023, 10:32 AM

Details

Summary

This reverts 9097e3cbcac4, which was in itself a revert of upstream
libcxxrt commits 88bdf6b290da ("Specify double-word alignment for ARM
unwind") and b96169641f79 ("Updated Itanium unwind"), and a
reapplication of our commit 3c4fd2463bb2 ("libcxxrt: add padding in
__cxa_allocate_* to fix alignment").

The editors/libreoffice port will be patched to be able to cope with the
standards-compliant alignment of _Unwind_Exception and consequently,
that of __cxa_exception. The layouts and sizes of these structures
should then be completely the same for libcxxrt, libunwind and
libc++abi.

MFC after: 3 days

Test Plan

build and run libreoffice *again*

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dim requested review of this revision.Mar 8 2022, 10:34 PM

Please can you raise a PR upstream that adds a macro to select between the two ABIs, so that we're not carrying a diff in the FreeBSD version?

contrib/libcxxrt/exception.cc
575

Please can you add an extra condition in this #if, so that we can just fall into the = 0 path and not touch the rest of the code?

contrib/libcxxrt/unwind-arm.h
100

Please can you guard this with the same macro?

contrib/libcxxrt/unwind-itanium.h
87

Please can you guard this with the same macro?

Note that this actually *removes* diffs from upstream libcxxrt! So I wouldn't like to add yet another layer of ifdefs to conditionally enable these hacks again... :)

I.e. this commit is meant to make our libcxxrt as much the same as upstream libcxxrt. (That said, we might want to do another sync-up in the future, but not right now.)

Ah, sorry, I thought these were additional changes. Looking more carefully, these all seem to be things that we've done upstream already.

This revision is now accepted and ready to land.Mar 9 2022, 9:56 AM

Ah, sorry, I thought these were additional changes. Looking more carefully, these all seem to be things that we've done upstream already.

Yes, this is all meant to reduce differences between our libcxxrt and upstream. After this, we only have some minor differences left, in particular in libelftc_dem_gnu3.c (this was due to d149877758f162f0c777e7760164bf2c1f7a1bc1, "Fix possibly unitialized variables in __cxa_demangle_gnu3()").