A very simple exception test case results in an abort trap: host% cat exctest.cpp struct StackThing { ~StackThing() { } }; struct Thrower { static void Throw() { StackThing obj; throw -1; } }; int main() { try { Thrower::Throw(); } catch (...) { } } host% g++-4.4.3 exctest.cpp && ./a.out Abort trap host% The problem is absent if the exception and stack object are not in a thrower function, or if the stack object has no destructor. This is using an all-defaults build of the 4.4.3 tarball on MacOS X 10.6.2 (Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386)
This doesn't occur with gcc trunk on x86_64-apple-darwin10 but does for gcc 4.4.3. Perhaps backporting r151960 to avoid compact unwind code on gcc 4.4 branch for darwin10 would solve this.
r151960 doesn't eliminate the problem in gcc 4.4 branch.
This bug occurs in both gcc 4.4.3 and 4.4.2 on x86_64-apple-darwin10, however it doesn't occur under x86_64-apple-darwin9. This may be a compatibility issue with the FSF gcc unwinder code executed on the libSystem unwinder under darwin10.
This is most likely related to PR 43099.
I wonder if the remaining failure on *86*-apple-darwin9 for PR41991 could also be due to PR43099?
*** This bug has been marked as a duplicate of 42159 ***