_Unwind_RaiseException incompatibility?
Andreas Jaeger
aj@suse.de
Tue Sep 2 08:41:00 GMT 2003
Stephan Bergmann <stephan.bergmann@sun.com> writes:
> Hi all.
>
> I have a GCC-3.2--built executable that loads shared libraries and
> executes code in them. I now experience problems when some of those
> shared libraries are compiled with GCC 3.3 instead of 3.2; C++
> exception handling within those libraries leads to std::terminate and
> abort. The stdc++ and gcc_s libraries used by the process are those
> from GCC 3.2. I tracked down one cause for an abort as follows: A
You need libstdc++ and libgcc_s from 3.3 if you run libraries compiled
with 3.3.
> GCC-3.3--built shared library wants to throw a C++ exception, calls
> __cxa_throw (stdc++ library), which in turn calls
> _Unwind_RaiseException (gcc_s library). For some reason,
> _Unwind_RaiseException (erroneously) returns normally, so that
> __cxa_throw continues with a call to std::terminate. If I only
> replace the used gcc_s library (from GCC 3.2) with the one from GCC
> 3.3, everything appears to work fine (I tested various scenarios where
> a C++ exception is thrown in one library and caught in the
> same/another/the executable).
>
> My question now: Is this a known issue? Does anybody know whether my
> problem (GCC-3.2--built executable executing shared libraries built
> with both GCC 3.2 and 3.3) is solved reliably if I always use the
> gcc_s library from GCC 3.3---that is, will _all_ scenarios with
> inter-/intra-library exceptions work?
It should work in all cases. If not, it's a bug. But the other way
round - as you tried - is expected to fail and not supported,
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030902/05452aa7/attachment.sig>
More information about the Gcc
mailing list