This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Minimal GCC/Linux shared lib + EH bug example


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]