Requirements for throwing C++ exceptions from one shared library to another in gcc 4.1.0 and gcc 3.2?

Glenn Serre serre@adobe.com
Fri Jan 19 23:17:00 GMT 2007


Good afternoon, 

In case anyone else is interested, here are our recent experimental
results regarding throwing exceptions across shared libraries.  I
corrected and changed the subject line a bit from the orignal with the
aim of helping future archive searches. 

Using gcc 4.1.0 on x86 Linux 2.6:
Using shared-libgcc and shared libstdc++, throwing exceptions across
shared libraries works with no observed errors. 
Using -static-libgcc, and a statically-linked libstdc++, throwing
exceptiosn across shared libraries sometimes works correctly, but
sometimes does not. 
Throwing exceptions from one shared library to the calling executable
works with no observed errors.  

Using gcc 3.2 on sparc Solaris: 
Using -shared-libgcc and shared libstdc++, throwing exceptions across
shared libraries works with no observed errors.  
Using -static-libgcc and a statically-linked libstdc++, throwing
exceptions across shared libraries appears to never work correctly. 
Throwing exceptions from one shared library to the calling executable
works with no observed errors.  

Thanks,
--Glenn S.



More information about the Gcc-help mailing list