C++ runtime version patch for testing

David Chisnall theraven at FreeBSD.org
Sun Jan 27 13:28:57 UTC 2013


Hi All,

Here is a patch that, I believe, should fix the symbol version mismatches between the runtime and the STL implementation.  I have run the exception tests from libcxxrt with this patch applied and:

- libsupc++ & libstdc++
- libcxxrt & libstdc++
- libcxxrt & libc++

All tests pass for me now.  Please let me know if there are any problems with this, otherwise I'll aim to commit it today or tomorrow with a 1-week MFC.

David

Index: gnu/lib/libsupc++/Version.map
===================================================================
--- gnu/lib/libsupc++/Version.map	(revision 245840)
+++ gnu/lib/libsupc++/Version.map	(working copy)
@@ -142,6 +142,28 @@
     _ZdaPvRKSt9nothrow_t;
     _ZdlPv;
     _ZdlPvRKSt9nothrow_t;
+    extern "C++" {
+      std::set_new_handler*;
+      std::set_terminate*;
+      std::set_unexpected*;
+      std::bad_alloc*;
+
+      std::bad_alloc*;
+      std::bad_cast*;
+      std::exception*;
+
+      "typeinfo for std::bad_alloc";
+      "typeinfo for std::bad_cast";
+      "typeinfo for std::exception";
+
+      "typeinfo name for std::bad_alloc";
+      "typeinfo name for std::bad_cast";
+      "typeinfo name for std::exception";
+
+      "vtable for std::bad_alloc";
+      "vtable for std::bad_cast";
+      "vtable for std::exception";
+    };
 };
 
 CXXABI_1.3.1 {
Index: lib/libcxxrt/Version.map
===================================================================
--- lib/libcxxrt/Version.map	(revision 245840)
+++ lib/libcxxrt/Version.map	(working copy)
@@ -209,18 +209,7 @@
 
         "std::type_info::type_info(std::type_info const&)";
         "std::type_info::type_info(std::type_info const&)";
-        "std::type_info::~type_info()";
-        "std::type_info::~type_info()";
-        "std::type_info::~type_info()";
         "std::type_info::operator=(std::type_info const&)";
-        "std::unexpected()";
-        "std::get_terminate()";
-        "std::set_terminate(void (*)())";
-        "std::get_unexpected()";
-        "std::set_unexpected(void (*)())";
-        "std::set_new_handler(void (*)())";
-        "std::uncaught_exception()";
-        "std::terminate()";
 
 
         # Extensions
@@ -243,70 +232,25 @@
 CXXRT_1.0 {
 
     extern "C++" {
-        "std::bad_cast::what() const";
-        "std::bad_typeid::what() const";
-        "std::bad_alloc::what() const";
-        "std::exception::what() const";
         "std::type_info::name() const";
         "std::type_info::before(std::type_info const&) const";
         "std::type_info::operator==(std::type_info const&) const";
         "std::type_info::operator!=(std::type_info const&) const";
-        "std::bad_typeid::bad_typeid(std::bad_typeid const&)";
-        "std::bad_typeid::bad_typeid()";
-        "std::bad_typeid::bad_typeid(std::bad_typeid const&)";
-        "std::bad_typeid::bad_typeid()";
-        "std::bad_typeid::~bad_typeid()";
-        "std::bad_typeid::~bad_typeid()";
-        "std::bad_typeid::~bad_typeid()";
-        "std::bad_typeid::operator=(std::bad_typeid const&)";
         "std::bad_cast::bad_cast(std::bad_cast const&)";
         "std::bad_cast::bad_cast()";
         "std::bad_cast::bad_cast(std::bad_cast const&)";
         "std::bad_cast::bad_cast()";
-        "std::bad_cast::~bad_cast()";
-        "std::bad_cast::~bad_cast()";
-        "std::bad_cast::~bad_cast()";
         "std::bad_cast::operator=(std::bad_cast const&)";
-        "std::bad_alloc::bad_alloc(std::bad_alloc const&)";
-        "std::bad_alloc::bad_alloc()";
-        "std::bad_alloc::bad_alloc(std::bad_alloc const&)";
-        "std::bad_alloc::bad_alloc()";
-        "std::bad_alloc::~bad_alloc()";
-        "std::bad_alloc::~bad_alloc()";
-        "std::bad_alloc::~bad_alloc()";
-        "std::bad_alloc::operator=(std::bad_alloc const&)";
         "std::exception::exception(std::exception const&)";
         "std::exception::exception()";
         "std::exception::exception(std::exception const&)";
         "std::exception::exception()";
-        "std::exception::~exception()";
-        "std::exception::~exception()";
-        "std::exception::~exception()";
         "std::exception::operator=(std::exception const&)";
 
 
-        "vtable for std::bad_typeid";
-        "vtable for std::bad_cast";
-        "vtable for std::bad_alloc";
-        "vtable for std::exception";
-        "vtable for std::type_info";
-        "typeinfo for std::bad_typeid";
-        "typeinfo for std::bad_cast";
-        "typeinfo for std::bad_alloc";
-        "typeinfo for std::exception";
-        "typeinfo for std::type_info";
-        "typeinfo name for std::bad_typeid";
-        "typeinfo name for std::bad_cast";
-        "typeinfo name for std::bad_alloc";
-        "typeinfo name for std::exception";
-        "typeinfo name for std::type_info";
 
-        "std::type_info::__is_function_p() const";
-        "std::type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const";
-        "std::type_info::__is_pointer_p() const";
 
 
-
     };
     __cxa_allocate_dependent_exception;
     __cxa_current_primary_exception;
@@ -317,6 +261,15 @@
 
 } CXXABI_1.3.1;
 
+
+GLIBCXX_3.4.9 {
+    extern "C++" {
+        "std::bad_typeid::what() const";
+        "std::bad_cast::what() const";
+        "std::bad_alloc::what() const";
+    };
+};
+
 GLIBCXX_3.4 {
     extern "C++" {
         "operator delete[](void*)";
@@ -327,5 +280,41 @@
         "operator new[](unsigned long)";
         "operator new(unsigned long)";
         "operator new(unsigned long, std::nothrow_t const&)";
+
+        "std::unexpected()";
+        "std::get_terminate()";
+        "std::get_unexpected()";
+        "std::uncaught_exception()";
+        "std::terminate()";
+
+        "std::type_info::~type_info()";
+        "std::bad_cast::~bad_cast()";
+        "std::exception::~exception()";
+
+        std::set_new_handler*;
+        std::set_terminate*;
+        std::set_unexpected*;
+        std::exception*;
+        std::bad_alloc*;
+        std::bad_typeid*;
+        std::type_info*;
+
+        "vtable for std::bad_alloc";
+        "vtable for std::bad_cast";
+        "vtable for std::bad_typeid";
+        "vtable for std::exception";
+        "vtable for std::type_info";
+
+        "typeinfo for std::bad_alloc";
+        "typeinfo for std::bad_typeid";
+        "typeinfo for std::exception";
+        "typeinfo for std::bad_cast";
+        "typeinfo for std::exception";
+        "typeinfo for std::type_info";
+        "typeinfo name for std::bad_typeid";
+        "typeinfo name for std::bad_cast";
+        "typeinfo name for std::exception";
+        "typeinfo name for std::type_info";
+
     };
 };

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20130127/6b07e22c/attachment.sig>


More information about the freebsd-toolchain mailing list