From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1430 invoked by alias); 4 Aug 2008 15:00:08 -0000 Received: (qmail 1412 invoked by uid 22791); 4 Aug 2008 15:00:05 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Aug 2008 14:59:30 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m74ExSsj015203; Mon, 4 Aug 2008 10:59:28 -0400 Received: from localhost.localdomain (vpn-14-28.rdu.redhat.com [10.11.14.28]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m74Ex5nx016682; Mon, 4 Aug 2008 10:59:16 -0400 Message-ID: <48971938.40203@redhat.com> Date: Mon, 04 Aug 2008 15:00:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.16 (X11/20080707) MIME-Version: 1.0 To: Barry Andrews CC: gcc-help@gcc.gnu.org Subject: Re: Mixing exception handling libraries with non exception handling References: <489714C9.6010109@gmail.com> In-Reply-To: <489714C9.6010109@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00032.txt.bz2 Barry Andrews wrote: > I have a 3rd party library ( which I'll call X ) which I believe was > compiled with exception handling disabled. Then I have my C++ library > which does have exception handling. When I load the X library first into > a process, then load my library in the same process, exception handling > becomes disabled and the abort() function is called. from unwind-dc2.c > if I try to throw an exception in my code. This only happens if I load > the X library first. I don't have any control over the X library, i.e. I > cannot recompile it. > > Has anyone run into this before? Yes. > Is there some compiler option in gcc or > #define I should have to keep exception handling enabled when I load my > library? No. > It appears that this is some sort of runtime thing. Yes. Throwing an exception uses unwinder data which the runtime library uses to unwind frames on the stack when an exception is thrown. No unwinder data and you can't throw an exception; it can't be helped. Andrew.