This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Minimal GCC/Linux shared lib + EH bug example
- From: Jason Merrill <jason at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "Martin v. Loewis" <martin at v dot loewis dot de>,David Abrahams <david dot abrahams at rcn dot com>,"Ralf W. Grosse-Kunstleve" <rwgk at cci dot lbl dot gov>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sun, 12 May 2002 20:24:35 +0100
- Subject: Re: Minimal GCC/Linux shared lib + EH bug example
- References: <88580000.1021230060@warlock.codesourcery.com>
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
> All that said, I'm surprised that throwing exceptions -- without crossing
> DSO boundaries -- doesn't work. I'd expect that would work almost by
> accident.
The problem in this case is that both DSOs link against the same shared
library. Both call a function in that library, which calls back into the
appropriate DSO, which throws an exception. For the first DSO loaded, the
catch clause in the library matches. For the second, it doesn't, as it's
checking against the typeinfo from the first.
I suspect that this is really a bug in the Linux dynamic loader, that the
typeinfo references should bind separately for the two DSOs, as David has
suggested. I've verified that this test works properly on Solaris, though
my investigation as to why must wait while I build a new gdb.
Jason