[Bug target/48097] new Throw_2 failures in libjava under Xcode 4.0

howarth at nitro dot med.uc.edu gcc-bugzilla@gcc.gnu.org
Fri Mar 18 00:45:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48097

--- Comment #4 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-03-18 00:45:08 UTC ---
The darwin linker developer says....
----------------------------------------------------------------------------
This is not a tools bug.  It worked by luck with Xcode3 tools.  The is a
runtime bug in the uwinder.

The Throw2.exe does not matter.  All that matters is the libgcj.12.dylib
binary.  The test installs a signal handler and which turns the signal into a
C++ exception and throws it. This means it has to unwind through a sigtramp.
This generally works, but in this case the bus error happens on the first
instruction in a function (java::lang::String::length()).   When the unwinder
walks the stack, it assumes each address on the stack is a return address,
which means it is the address *after* the CALL site, so you look for an FDE
from with an address that covers the byte before the address you are looking
for.

In the xcode3 built libgcj.12.dylib, there was a function right before
java::lang::String::length().  In the xcode4 case there are pad bytes before
that function and the pad bytes are not covered by the FDE.  So at runtime, the
unwinder cannot find an FDE for the start address of
java::lang::String::length, hence the abort.



More information about the Gcc-bugs mailing list