From patchwork Mon Jan 16 17:07:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 136320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8154EB6F7E for ; Tue, 17 Jan 2012 04:08:23 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1327338504; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=A8KCcRLkOKStca6B16uhAmScFAA=; b=a3AZUVt1F0in9gI Kp+/FhmVUTjOzVojpW+2T2GUxBWiDZlqHgFnJcg7LqMZWSZoz/Sb5zgk4jXZG13U Sh+GQVRW10Us93x8jYpPK6DsBcal/u+v2XSe/66R4Ig+ZlbSWbNLB5uSqq2X8n3s CNxfYfVZifh4G/miOzPgX2a4Tdmo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=H92tIXsA9ncThXIGoA3cmNxAGjPi+7jmYZXzY0U/taYinRfKYSYSCjo5qyUmBG PFd0Mft6dECRvKpxY2zonBp1/nH9Xoo1lTuBklsxfUk3dSsRac8lD2P5DAWGtOl3 Z8H/c3tU7dC/sKtzBcTOYQwgjtMuNxq/aliI9ybzoz+2w=; Received: (qmail 3915 invoked by alias); 16 Jan 2012 17:08:13 -0000 Received: (qmail 3792 invoked by uid 22791); 16 Jan 2012 17:08:10 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 17:07:57 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 52C6D17A; Mon, 16 Jan 2012 18:07:56 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Oogwl7HyTlVs; Mon, 16 Jan 2012 18:07:54 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 3A721179; Mon, 16 Jan 2012 18:07:54 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id q0GH7rLU012841; Mon, 16 Jan 2012 18:07:53 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Richard Henderson Subject: [libitm] Link eh-1.exe with -shared-libgcc on Solaris (PR libitm/51822) Date: Mon, 16 Jan 2012 18:07:53 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org As reported in PR libitm/51822, the libitm.c++/eh-1.C test FAILs on Solaris with terminate called after throwing an instance of 'int' I found that the failures are for two different reasons: * Enabling ld.so.1 debugging (LD_DEBUG=bindings), it turned out that the 64-bit failures on Solaris 10 and 11 happen since _Unwind_RaiseException from libc is used: 25243: 1: binding file=../../../gcc/amd64/libgcc_s.so.1 (0xfffffd7fc21e6910:0x16910) at plt[27]:full to file=/lib/64/libc.so.1 (0xfffffd7fff05a250:0x12a250): symbol '_Unwind_RaiseException' Unlike SPARC and the 32-bit libc, the 64-bit one provides an implementation of the unwinder, which seems to break this test. Linking the test with -shared-libgcc fixes it. * The 32-bit failures on Solaris 8 to 10 have a different root cause: _Unwind_Find_FDE returns NULL for an address in _ZGTtL2f1v (f1()). It turns out that there are two copies of the unwinder in eh-1.exe: one from libgcc_s.so.1, and another one from libgcc_eh.a. eh-1.o has a reference to _Unwind_Resume (don't yet know why), which is resolved from libgcc_eh.a. This doesn't happen on Solaris 11, which uses the dl_iterate_phdr based unwinder, thus no __register_frame_info_bases. Again, linking with shared-libgcc allows the testcase to succeed. Bootstrapped without regressions on i386-pc-solaris2.11. Ok for mainline? Rainer 2012-01-15 Rainer Orth PR libitm/51822 * testsuite/libitm.c++/eh-1.C: Add -shared-libgcc on *-*-solaris2*. # HG changeset patch # Parent b41d70648bc4d3ba4c7930a694c0100973a1ed01 Link eh-1.exe with -shared-libgcc on Solaris (PR libitm/51822) diff --git a/libitm/testsuite/libitm.c++/eh-1.C b/libitm/testsuite/libitm.c++/eh-1.C --- a/libitm/testsuite/libitm.c++/eh-1.C +++ b/libitm/testsuite/libitm.c++/eh-1.C @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-options "-shared-libgcc" { target *-*-solaris2* } } extern "C" void abort ();