From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6745 invoked by alias); 18 Mar 2011 00:45:25 -0000 Received: (qmail 6733 invoked by uid 22791); 18 Mar 2011 00:45:24 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_IB X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Mar 2011 00:45:19 +0000 From: "howarth at nitro dot med.uc.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/48097] new Throw_2 failures in libjava under Xcode 4.0 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: howarth at nitro dot med.uc.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 18 Mar 2011 00:45:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg01934.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48097 --- Comment #4 from Jack Howarth 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.