public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Barry Andrews <titanandrews@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Mixing exception handling libraries with non exception handling
Date: Mon, 04 Aug 2008 15:00:00 -0000	[thread overview]
Message-ID: <48971938.40203@redhat.com> (raw)
In-Reply-To: <489714C9.6010109@gmail.com>

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.

  reply	other threads:[~2008-08-04 15:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 14:40 Barry Andrews
2008-08-04 15:00 ` Andrew Haley [this message]
     [not found]   ` <48971DE4.90804@gmail.com>
2008-08-04 15:26     ` Andrew Haley
     [not found]       ` <48972282.2060208@gmail.com>
2008-08-04 15:54         ` Andrew Haley
     [not found]           ` <489728DE.50403@gmail.com>
2008-08-04 16:25             ` Andrew Haley
2008-08-05 14:33           ` Ian Lance Taylor
     [not found]             ` <489867BB.1090204@gmail.com>
2008-08-05 15:28               ` Andrew Haley
2008-08-05 16:23               ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48971938.40203@redhat.com \
    --to=aph@redhat.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=titanandrews@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).