369446 |
10-Mar-2021 |
git2svn |
Partially revert libcxxrt changes to avoid _Unwind_Exception change
After the recent cherry-picking of libcxxrt commits 0ee0dbfb0d26 and d2b3fadf2db5, users reported that editors/libreoffice packages from the official package builders did not start anymore. It turns out that the combination of these commits subtly changes the ABI, requiring all applications that depend on internal details of struct _Unwind_Exception (available via unwind-arm.h and unwind-itanium.h) to be recompiled.
However, the FreeBSD package builders always use -RELEASE jails, so these still use the old declaration of struct _Unwind_Exception, which is not entirely compatible. In particular, LibreOffice uses this struct in its internal "uno bridge" component, where it attempts to setup its own exception handling mechanism.
To fix this incompatibility, go back to the old declarations of struct _Unwind_Exception, and restore the __LP64__ specific workaround we had in place before (which was to cope with yet another, older ABI bug).
Effectively, this reverts upstream libcxxrt commits 88bdf6b290da ("Specify double-word alignment for ARM unwind") and b96169641f79 ("Updated Itanium unwind"), and reapplies our commit 3c4fd2463bb2 ("libcxxrt: add padding in __cxa_allocate_* to fix alignment").
PR: 253840
Git Hash: 3a5074327da0ceba770aef60e41e91dc7d054019 Git Author: dim@FreeBSD.org |
369363 |
24-Feb-2021 |
dim |
Fix possibly unitialized variables in __cxa_demangle_gnu3()
After 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 where I imported a more recent libcxxrt snapshot, the variables 'rtn' and 'has_ret' could in some cases be used while still uninitialized. Most obviously this would lead to a jemalloc complaint about a bad free(), aborting the program.
Fix this by initializing a bunch variables in their declarations. This change has also been sent upstream, with some additional changes to be used in their testing framework.
PR: 253226
(cherry picked from commit d149877758f162f0c777e7760164bf2c1f7a1bc1)
Git Hash: 696961f67c5eaabe03713dbf1b4fc2b7a0ce1cb1 Git Author: dim@FreeBSD.org |
369332 |
21-Feb-2021 |
dim |
Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456
Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3
Reported by: arichardson PR: 253226
(cherry picked from commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368)
Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way
In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception:
https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db
However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2
Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments.
It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream.
PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799
(cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4)
Git Hash: 0aa8c6552ff58a8945a62750771b3f582f938d08 Git Author: dim@FreeBSD.org |
369326 |
20-Feb-2021 |
dim |
Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way"
This reverts commit 49e7d3fee6ac52d1c65160a71b1f2be70e43c5e1, since I messed up and didn't merge the earlier libcxxrt changes first.
Git Hash: 9418450e056f8a75c0e5d0b1197d94745da0c18d Git Author: dim@FreeBSD.org |
369324 |
20-Feb-2021 |
dim |
Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way
In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception:
https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db
However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2
Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments.
It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream.
PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799
(cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4)
Git Hash: 49e7d3fee6ac52d1c65160a71b1f2be70e43c5e1 Git Author: dim@FreeBSD.org |
367467 |
08-Nov-2020 |
dim |
MFC r367323:
Update libcxxrt's private copy of elftoolchain demangler
This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with the most recent version from upstream r3877. Similar to r367322, this fixes a number of possible assertions, and allows it to correctly demangle several names that it could not handle before.
PR: 250702
MFC r367337:
Make vector-related functions in libcxxrt's demangler static
Follow-up to r367323 by re-adding static to a number of the functions copied from elftc's libelftc_vstr.c. This was requested by upstream.
PR: 250702 |
352377 |
16-Sep-2019 |
dim |
MFC r352306:
Include <stdint.h> in unwind-arm.h, since it uses uint32_t and uint64_t in various declarations.
Otherwise, depending on how unwind-arm.h is included from other source files, the compiler may complain that uint32_t and uint64_t are unknown types. |
350400 |
29-Jul-2019 |
dim |
MFC r350360:
Merge libcxxrt master f96846efbfd508f66d91fcbbef5dd808947c7f6d.
Interesting fixes: f96846e Fix std::size_t -> size_t to unbreak build against libc++ 6.0.0 6f4cfa2 Fix the uncaught exception count with rethrowing (PR 239265) db54f53 Added C++14-specific operator delete (#47)
PR: 239265 |
316354 |
01-Apr-2017 |
dim |
MFC r315947:
Import libcxxrt master 8a853717e61d5d55cbdf74d9d0a7545da5d5ff92.
Interesting fixes which were not already merged: 0c7c611 Merge C++ demangler bug fixes from ELF Tool Chain (#40) 2b208d9 __cxa_demangle_gnu3: demangle 'z' as '...', not 'ellipsis' (#41) |
315943 |
25-Mar-2017 |
dim |
MFC r315745:
Cherry-pick libcxxrt commit 8a853717e61d5d55cbdf74d9d0a7545da5d5ff92:
Author: David Chisnall <theraven@FreeBSD.org> Date: Wed Mar 22 12:27:08 2017 +0000
Simplify some code.
realloc() with a null pointer is equivalent to malloc, so we don't need to handle the two cases independently.
Fixes #46
This should help with lang/beignet and other programs, which expect __cxa_demangle(name, NULL, NULL, &status) to return zero in status.
PR: 213732 |
305559 |
07-Sep-2016 |
dim |
MFC r305396:
Add _US_ACTION_MASK to libcxxrt's arm-specific unwind header. This value is used in newer versions of compiler-rt. |
303619 |
01-Aug-2016 |
emaste |
iMFC r303400: libcxxrt: fix demangling of wchar_t
'wchar_t' is 7 characters long, not 6. r303297 (MFC'd in r303398) fixed this in libelftc, but not the second copy of this file that we have in libcxxrt.
PR: 208661 Approved by: re (gjb) |
303292 |
25-Jul-2016 |
emaste |
MFC r303157: libcxxrt: add padding in __cxa_allocate_* to fix alignment
The addition of the referenceCount to __cxa_allocate_exception put the unwindHeader at offset 0x58 in __cxa_exception, but it requires 16-byte alignment. In order to avoid changing the current __cxa_exception ABI (and thus breaking its consumers), add explicit padding in the allocation routines (and account for it when freeing).
This is intended as a lower-risk change for FreeBSD 11. A "more correct" fix should be prepared for upstream and -CURRENT.
Approved by: re (gjb) Sponsored by: The FreeBSD Foundation |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
299144 |
05-May-2016 |
dim |
Import libcxxrt master 516a65c109eb0a01e5e95fbef455eb3215135cef.
Interesting fixes: 3adaa2e Fix _Unwind_Exception cleanup functions 286776c Check exception cleanup function ptr before calling edda626 Correct exception specifications on new and delete operators
|
299143 |
05-May-2016 |
dim |
Since contrib/libcxxrt's ancestry was never correct, subversion 1.8 and higher cannot merge to it from the vendor area.
Re-bootstrap the ancestry by doing (apologies to your retinas): * svn pg svn:mergeinfo contrib/libcxxrt > mergeinfo.txt * svn rm contrib/libcxxrt * svn cp ^/vendor/libcxxrt/dist@297299 contrib/libcxxrt * svn rm CMakeLists.txt doxygen_config * svn cp ^/head/contrib/libcxxrt/FREEBSD-upgrade@297299 contrib/libcxxrt * svn cp ^/head/contrib/libcxxrt/exception.cc@297299 contrib/libcxxrt * svn cp ^/head/contrib/libcxxrt/unwind-arm.h@297299 contrib/libcxxrt * svn pd -R svn:mergeinfo contrib/libcxxrt * svn ps -F mergeinfo.txt svn:mergeinfo contrib/libcxxrt
|
284549 |
18-Jun-2015 |
emaste |
Import libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65
This includes a number of fixes to the C++ demangler (obtained from upstream ELF Tool Chain).
|
278013 |
31-Jan-2015 |
dim |
Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc.
Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw()
|
276375 |
29-Dec-2014 |
dim |
Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.
Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length
|
255813 |
23-Sep-2013 |
theraven |
Imported newer libcxxrt into vendor branch.
|
253145 |
10-Jul-2013 |
theraven |
Import new libcxxrt into vendor branch.
|
249987 |
27-Apr-2013 |
dim |
Import c812a07cd2f95c1403baf0bbe0366e7618d1d6d3 of libcxxrt:
* Fix a copy-and-paste error when setting the unexpected exception handler (actually set the terminate handler by mistake).
* Fix some warnings.
Patch by Joerg Sonnenberger!
* Don't call the _fast version of the TLS accessor in terminate() or unexpected().
1) TLS may not have been set up yet. 2) When we're in one of these functions, Really Bad Stuff has happened and potentially saving a few cycles really isn't important.
* Merge in fixes from FreeBSD trunk to make atomics work with recent clang.
|
245743 |
21-Jan-2013 |
theraven |
Imported new libcxxrt (one-line fix).
|
245302 |
11-Jan-2013 |
theraven |
Import b9db3a010143160624f123763025ab544b69bd9a of libcxxrt. This brings in three fixes:
- Don't treat pointers to members as pointers in catch blocks (they're usually fat pointers).
- Correctly catch foreign exceptions in catchalls.
- Ensure that a happens-before relationship is established when setting terminate handlers in one thread and calling them in another.
|
233233 |
20-Mar-2012 |
theraven |
Import new version of libcxxrt to vendor branch.
Approved by: dim (mentor)
|
232922 |
13-Mar-2012 |
theraven |
Import new version of libcxxrt.
Approved by: dim (mentor)
|
227995 |
26-Nov-2011 |
theraven |
Imported the latest version of libcxxrt.
Approved by: dim (mentor)
|
227972 |
25-Nov-2011 |
theraven |
Import the new version of libcxxrt, which grew an extra ARM.
Approved by: dim (mentor)
|
227825 |
22-Nov-2011 |
theraven |
Import libcxxrt / libc++ into a vendor branch.
Approved by: dim (mentor)
|