Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2013 15:17:51 +0000
From:      David Chisnall <theraven@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        toolchain@FreeBSD.org
Subject:   Re: C++ runtime version patch for testing
Message-ID:  <90749775-2C2E-4E8B-9BC2-670BE5F2798B@FreeBSD.org>
In-Reply-To: <20130127150313.GM2522@kib.kiev.ua>
References:  <EDDAA896-D752-450F-89A0-4831FB016AC5@FreeBSD.org> <20130127150313.GM2522@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_0D58810B-063C-4B2B-BE28-DAC66DF05352
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

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";
>> +    };
>> };
>>=20
>> CXXABI_1.3.1 {
>> Index: lib/libcxxrt/Version.map
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- lib/libcxxrt/Version.map	(revision 245840)
>> +++ lib/libcxxrt/Version.map	(working copy)
>> @@ -209,18 +209,7 @@
>>=20
>>         "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=3D(std::type_info const&)";
> [omitted]
>=20
> 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- gnu/lib/libsupc++/Version.map	(revision 245840)
+++ gnu/lib/libsupc++/Version.map	(working copy)
@@ -130,6 +130,13 @@
     *;
 };
=20
+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";
+    };
 };
=20
 CXXABI_1.3.1 {
Index: lib/libcxxrt/Version.map
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- lib/libcxxrt/Version.map	(revision 245840)
+++ lib/libcxxrt/Version.map	(working copy)
@@ -209,18 +209,7 @@
=20
         "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=3D(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()";
=20
=20
         # Extensions
@@ -243,70 +232,25 @@
 CXXRT_1.0 {
=20
     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=3D=3D(std::type_info const&) const";
         "std::type_info::operator!=3D(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=3D(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=3D(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=3D(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=3D(std::exception const&)";
=20
=20
-        "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";
=20
-        "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";
=20
=20
-
     };
     __cxa_allocate_dependent_exception;
     __cxa_current_primary_exception;
@@ -317,6 +261,15 @@
=20
 } CXXABI_1.3.1;
=20
+
+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";
+
     };
 };


--Apple-Mail=_0D58810B-063C-4B2B-BE28-DAC66DF05352
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)

iQIcBAEBAgAGBQJRBUUgAAoJEKx65DEEsqIdyvMQAJoHt2mVRfJnA5AiTdu5KEVN
OWIqLTL+oM8ANWzNUL6WdtZXTKCF+vTV90sRzrKR9xNujw3OBjVzxDIcU9I++rN/
p94/29J/aKiYrBmkBjkHHl5d2zZPIE8PHuQrBNfn7apsVbUn01Xz+F2gz9CQXbmJ
VL4LRM1uap1dUtsAnTKJAfKyOFjNLyqMiRbrjhgDANzDI+OGBi/9tji0sQN3YbPk
Njn7I1Z4jmB+iwFoWV8HoG/jrA8tAad8j4kNyACmuNv+SXceEYZ8dmoBsebBrVrD
aX3ELbJsp3csnfdQ/SbPwAcXGhAP2tFcNyAkTrO7a1kApAkR8dvJKBO1285Iap4F
UCWYW+uMI1cmVbNxb4Dt7Al54rAXluUGURv8QmHyBnzjnRP2YAktx6xSkVSVHmo9
9/A2fiUEGLtthF8QDqlD2I7Wi6AYc8zpkzIF6RRev5mHGGgUqS22cjuIw2TyA749
hwMkQM1EHNXj9aONDqk8nL5kv4yF5oRndYnAcUfrrWsD0fUnCOMDvGDi1wHgLosl
43iZxPeXLXlFoJIiN98vAN+4gHeqXbsqOQIVq7j80lhcYK0wwLqDfQBQGvc0/DsF
nQ1k1azTNZnHIeqXFMTpEUixFdBUqi/0gIiQCDK/v/5Q5eHZUoe3U1YlGdB+3X+F
9Gi2nq5IKrd62yot2Znh
=tA4m
-----END PGP SIGNATURE-----

--Apple-Mail=_0D58810B-063C-4B2B-BE28-DAC66DF05352--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90749775-2C2E-4E8B-9BC2-670BE5F2798B>