[v3] PATCH to libstdc++ for forced unwind handling (c++/28145)

Jakub Jelinek jakub@redhat.com
Thu May 3 07:19:00 GMT 2007


On Thu, May 03, 2007 at 02:35:46AM -0400, Jason Merrill wrote:
> This patch works around the iostream part of the problem by allowing 
> users to explicitly catch forced unwind, then explicitly rethrowing it 
> wherever iostreams wants to discard exceptions.

Thanks for working on this.

> Tested x86_64-pc-linux-gnu.  Any comments before I check it in?

Index: libstdc++-v3/config/abi/pre/gnu.ver
===================================================================
*** libstdc++-v3/config/abi/pre/gnu.ver (revision 124094)
--- libstdc++-v3/config/abi/pre/gnu.ver (working copy)
*************** CXXABI_1.3 {
*** 793,798 ****
--- 793,800 ----
      _ZTIN10__cxxabiv119__pointer_type_infoE;
      _ZTIN10__cxxabiv120__si_class_type_infoE;
      _ZTIN10__cxxabiv121__vmi_class_type_infoE;
+     _ZTIN10__cxxabiv115__forced_unwindE;
+     _ZTIN10__cxxabiv119__foreign_exceptionE;

      # typeinfo name
      _ZTS[a-fh-z];

You really can't add this to CXXABI_1.3, these symbols aren't in GCC 3.4.
It can't go into CXXABI_1.3.1 either, as they weren't in GCC 4.0.
So, you should add

CXXABI_1.3.2 {

     _ZTIN10__cxxabiv115__forced_unwindE;
     _ZTIN10__cxxabiv119__foreign_exceptionE;

} CXXABI_1.3.1;

at the end of the file instead (no matter whether you check this into
GCC 4.2 or only for 4.3+).

Index: libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
===================================================================
*** libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver     (revision
124094)
--- libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver     (working
copy)
*************** CXXABI_1.7 {
*** 178,183 ****
--- 178,185 ----
      _ZTIN10__cxxabiv119__pointer_type_infoE;
      _ZTIN10__cxxabiv120__si_class_type_infoE;
      _ZTIN10__cxxabiv121__vmi_class_type_infoE;
+     _ZTIN10__cxxabiv115__forced_unwindE;
+     _ZTIN10__cxxabiv119__foreign_exceptionE;

      # typeinfo name
      _ZTS[a-z];

This depends on whether you check this into GCC 4.2 (before the release
or not).  If GCC 4.2 is released without it, then no matter whether it is
added in GCC 4.2.1 or only in GCC 4.3, they should be added to CXXABI_1.7.1.

Which reminds me, has anybody double checked libstdc++.so symbol versions
compared to GCC 3.4/4.0/4.1, so that we don't repeat past mistakes (adding
new symbols in old symbol versions)?

	Jakub



More information about the Gcc-patches mailing list