_Unwind_ForcedUnwind in libgcc_s takes as one of it's parameters a stop
function to tell it when to stop unwinding. One of the stop function's
parameters is a _Unwind_Exception_Class. On most architectures this is an
int64_t, however on ARM EABI the gcc developers have made this a char array
with 8 items. While both of these take the same space they are passed into
the stop function differently, an int64_t is passed in in registers r2 and
r3, while the char[8] is passed in as a pointer to the first item in
register r2.
Because libthr expects the value to be an int64_t we would get incorrect
results when it passes a function that take an int64_t but libgcc passes in
a pointer to a char array including crashing.
The fix is to update libgcc_s to make it pass an int64_t to the stop
function and to libstdc++ as it expects _Unwind_Exception_Class to be an
array.
when building other C++ software with it. Also fix one actual bug in
libsupc++, which was exposed by such a warning. This latter fix is the
only functional change.
MFC after: 1 week
Unfortunately, the ABI was broken upstream for the 4.2 release, which we
imported. We then shipped the broken version for several years and certain
ports (e.g. libobjc2) depend on it, so we're stuck with it for now...
We should revisit this for 10.0, since we're allowed to break the ABI then, but
until then we should keep the ABI we shipped with 8.x and 9.x.
Reviewed by: kan
Approved by: dim (mentor)
MFC after: 1 week
from the gcc 4.2 branch.
The libraries in the gcc-4_2-branch remained under the LGPLv2.
The changes can be reproduced with the following command:
svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch/libstdc++-v3
-r 127959:135556
Reviewed by: mm
Approved by: jhb (mentor)
MFC after: 2 weeks