C++ runtime version patch for testing

David Chisnall theraven at FreeBSD.org
Sun Jan 27 15:18:00 UTC 2013


On 27 Jan 2013, at 15:03, Konstantin Belousov wrote:

> On Sun, Jan 27, 2013 at 01:28:44PM +0000, David Chisnall wrote:
>> +      std::set_new_handler*;
> What are the symbols you assigning the version there ? I cannot find
> anything in the libstdc++.so export list which would match the line.

std::set_new_handler(void (*)())

# objdump -T /usr/lib/libsupc++.so  | c++filt | grep new_h
0000000000009010 __float128    DF .text	000000000000000e  GLIBCXX_3.4 std::set_new_handler(void (*)())

>> +      std::set_terminate*;
>> +      std::set_unexpected*;
>> +      std::bad_alloc*;
>> +
>> +      std::bad_alloc*;
> std::bad_alloc seems to be duplicated.

Thanks, removed.

> Besides that, pristine libstdc++.so exports 'std::bad_alloc::what() const'
> at the GLIBCXX_3.4.9 namespace. You did this for the *::what()' from
> libcxxrt but not for the libsupc++.

Ooops.  I wrote a script that checked for version mismatches, but for some reason I missed this one.  Running it again, it shows two mismatches, both fixed in the new version of the diff.


>> +      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&)";
> [omitted]
> 
> Do applications record the dependency on the libcxxrt directly,
> using the DT_NEEDED tag ?

I don't believe so, they get it indirectly via libc++ or libstdc++.  How can I check?

David

Index: gnu/lib/libsupc++/Version.map
===================================================================
--- gnu/lib/libsupc++/Version.map	(revision 245840)
+++ gnu/lib/libsupc++/Version.map	(working copy)
@@ -130,6 +130,13 @@
     *;
 };
 
+GLIBCXX_3.4.9 {
+    extern "C++" {
+        "std::bad_alloc::what() const";
+        "std::bad_cast::what() const";
+    };
+};
+
 GLIBCXX_3.4 {
     # operator new and new[]
     _Znai[jm];
@@ -142,6 +149,27 @@
     _ZdaPvRKSt9nothrow_t;
     _ZdlPv;
     _ZdlPvRKSt9nothrow_t;
+    extern "C++" {
+      std::set_new_handler*;
+      std::set_terminate*;
+      std::set_unexpected*;
+
+      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/47518b7a/attachment.sig>


More information about the freebsd-toolchain mailing list