From owner-freebsd-toolchain@freebsd.org Sat Jul 29 16:55:26 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A498DC6ECD for ; Sat, 29 Jul 2017 16:55:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7598710FF; Sat, 29 Jul 2017 16:55:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::7118:ff63:c9d6:6285] (unknown [IPv6:2001:470:7a58:0:7118:ff63:c9d6:6285]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1B39B2D338; Sat, 29 Jul 2017 18:55:23 +0200 (CEST) From: Dimitry Andric Message-Id: <3F666806-E4A0-4FD0-915E-16767213A432@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_478CBF3F-DD24-4A25-A4D7-92A00454BA01"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: libcxxrt seems to lack some features that are present in libc++abi Date: Sat, 29 Jul 2017 18:55:22 +0200 In-Reply-To: Cc: FreeBSD Toolchain , Ed Maste To: Oleg Lelchuk References: X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 16:55:26 -0000 --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 wrote: > > libcxxrt seems to lack some features that are present in libc++abi. If I > compile this code and link it against libcxxrt: > > #include > #include > > int main() > { > int&& ref{4}; > std::cout << > boost::typeindex::type_id_with_cvr().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 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--