Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2017 18:55:22 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Oleg Lelchuk <oleglelchuk@gmail.com>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Ed Maste <emaste@freebsd.org>
Subject:   Re: libcxxrt seems to lack some features that are present in libc++abi
Message-ID:  <3F666806-E4A0-4FD0-915E-16767213A432@FreeBSD.org>
In-Reply-To: <CA%2BGqWgsvDCfU2KvF6Hd3cCKGa6MA62-6KtGJ5LNGJrBB%2B_T0hg@mail.gmail.com>
References:  <CA%2BGqWgsvDCfU2KvF6Hd3cCKGa6MA62-6KtGJ5LNGJrBB%2B_T0hg@mail.gmail.com>

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

--Apple-Mail=_478CBF3F-DD24-4A25-A4D7-92A00454BA01
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii

On 29 Jul 2017, at 18:14, Oleg Lelchuk <oleglelchuk@gmail.com> wrote:
> 
> libcxxrt seems to lack some features that are present in libc++abi. If I
> compile this code and link it against libcxxrt:
> 
> #include <iostream>
> #include <boost/type_index.hpp>
> 
> int main()
> {
>        int&& ref{4};
>        std::cout <<
> boost::typeindex::type_id_with_cvr<decltype(ref)>().pretty_name() <<
> std::endl;
> }
> 
> Then I get the message: "Abort (core dumped)". But if I link this code
> against libc++abi, then I get
> 
> the output "int&&". It seems to me libcxxrt doesn't know how to deal
> with rvalue references.

It's not that, it cannot demangle the returned string from boost, which
appears to be:

  N5boost9typeindex6detail9cvr_saverIOiEE

and which demangles (with c++filt) to:

  boost::typeindex::detail::cvr_saver<int&&>

Boost is throwing a std::runtime_error("Type name demangling failed")
object here, which should obviously be caught somewhere.

The demangler in libcxxrt is indeed rather old, and we should replace it
with something newer.  I'm not sure if the demangler of libc++abi is the
right one yet, since upstream seems to still be discussing which of
their three (or thereabouts) demanglers should be *the* LLVM demangler.

Ed, IIRC you had some looks at this before, do you have any preference?

-Dimitry


--Apple-Mail=_478CBF3F-DD24-4A25-A4D7-92A00454BA01
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.1

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWXy9+gAKCRCwXqMKLiCW
o7IKAJkBL5pO7nYYTO8u3NVz40hz+o5KkQCfdVbjt0xVGbZv/Zd7h/fySQkwqXk=
=+GQ6
-----END PGP SIGNATURE-----

--Apple-Mail=_478CBF3F-DD24-4A25-A4D7-92A00454BA01--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F666806-E4A0-4FD0-915E-16767213A432>