llvm-symbolize can't demangle some function in libc++
| Bugzilla Link | 23292 |
| Resolution | FIXED |
| Resolved on | Jul 14, 2017 12:57 |
| Version | unspecified |
| OS | Linux |
| CC | @KernelAddress,@kcc,@mclow,@rnk |
Extended Description
clang version 3.7.0 (trunk 235290) Target: x86_64-unknown-linux-gnu
Testing reproducer from https://llvm.org/bugs/show_bug.cgi?id=23235 with tsan-ified libc++ I got the following output:
#​0 _ZNSt3__18__invokeIMNS_19__async_assoc_stateIbNS_12__async_funcIZ4mainE3$_0JEEEEEFvvEPS5_JEvEEDTcldsdeclsr3std3__1E7forwardIT0_Efp0_Efp_spclsr3std3__1E7forwardIT1_Efp1_EEEOT_OS9_DpOSA_ include/c++/v1/__functional_base:382:43 (a.out+0x000000499458)
The function is not demangled while all other function are demangled. This looks like a bug in demangler.
Works fine with TOT llvm-cxxfilt, must have been fixed.
google-glog has a demangler.
https://github.com/google/glog
We've been talking about putting a demangler in LLVM so tools like lld and llvm-symbolizer don't have to rely on the (possibly out of date) platform demangler. However, the libcxxabi implementation of __cxa_demangle is apparently a disaster, and nobody wants to write a new one. :(
We declare function as extern "C" __cxa_demangle() and use whatever function is actually available in the executable (it can come from demangler in libc++abi, or from libsupc++).
Alexey, what function do we use for demangling in llvm-symbolizer by default? Is it __cxxabiv1::__cxa_demangle?