From nobody@FreeBSD.ORG Tue Oct 24 10:48:59 2000 Return-Path: Received: by hub.freebsd.org (Postfix, from userid 32767) id E45CA37B479; Tue, 24 Oct 2000 10:48:59 -0700 (PDT) Message-Id: <20001024174859.E45CA37B479@hub.freebsd.org> Date: Tue, 24 Oct 2000 10:48:59 -0700 (PDT) From: lampa@fee.vutbr.cz Sender: nobody@FreeBSD.ORG To: freebsd-gnats-submit@FreeBSD.org Subject: /usr/lib/libgcc.a is not thread safe X-Send-Pr-Version: www-1.0 >Number: 22274 >Category: gnu >Synopsis: /usr/lib/libgcc.a is not thread safe >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 24 10:50:00 PDT 2000 >Closed-Date: Tue Oct 24 14:06:00 PDT 2000 >Last-Modified: Tue Oct 24 14:10:01 PDT 2000 >Originator: Petr Lampa >Release: 4.1.1 >Organization: Brno University of Technology, CSE dept. >Environment: FreeBSD boco.fee.vutbr.cz 4.1.1-STABLE FreeBSD 4.1.1-STABLE >Description: Installed gcc library /usr/lib/libgcc.a is not compiled using --enable-threads. The description of this configure argument in gcc-2.95.2 is wrong, it should be on not only for Objective C, but also for C++ to enable thread safe stack unwinding during exception processing. From Orbacus C++ JTC-1.0.13 (www.ooc.com): IMPORTANT: You must ensure that the version of gcc that you are using was configured with --enable-threads. Without this exception handling is not thread safe. To determine if this is the case, run nm on libgcc.a and verify that pthread symbols are present. >How-To-Repeat: In my case regular arithmetic exception resulted in segmentation fault. If the program was linked with the proper library, exception is correctly catched and reported. >Fix: Ship /usr/lib/libgcc.a compiled with --enable-threads! >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: jasone State-Changed-When: Tue Oct 24 14:06:00 PDT 2000 State-Changed-Why: Very likely user error rather than a bug. From: Jason Evans To: lampa@fee.vutbr.cz Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: gnu/22274: /usr/lib/libgcc.a is not thread safe Date: 24 Oct 2000 14:05:56 -0700 On Tue, Oct 24, 2000 at 10:48:59AM -0700, lampa@fee.vutbr.cz wrote: > >Description: > Installed gcc library /usr/lib/libgcc.a is not compiled using > --enable-threads. The description of this configure argument > in gcc-2.95.2 is wrong, it should be on not only for Objective C, > but also for C++ to enable thread safe stack unwinding during exception > processing. > > >Fix: > Ship /usr/lib/libgcc.a compiled with --enable-threads! The correct solution is to use the -pthread gcc flag so that libgcc_r.a is used. If that still doesn't work, then please open a new PR. Jason >Unformatted: