On Fri, Dec 6, 2013 at 12:25 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Fri, Dec 06, 2013 at 12:19:45PM +0400, Dmitry Vyukov wrote: >> > And the reason why check-g++ tsan.exp fails even with this patch is >> > that apparently tsan doesn't try to demangle the symbol names, so we get >> > e.g.: >> >> Demangling must be done by the symbolizer. >> +samsonov for this > > So why does asan_report.cc have then: > static const char *MaybeDemangleGlobalName(const char *name) { > // We can spoil names of globals with C linkage, so use an heuristic > // approach to check if the name should be demangled. > return (name[0] == '_' && name[1] == 'Z') > ? Symbolizer::Get()->Demangle(name) > : name; > } > and uses it where it wants to demangle?
I would say this is a defect. It's symbolizer responsibility. > From what I can see, even when > you are using llvm-symbolizer, sanitizer_common doesn't pass -demangle > option to it. It defaults to true: static cl::opt<bool> ClDemangle("demangle", cl::init(true), cl::desc("Demangle function names"));