Index: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc =================================================================== --- lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc +++ lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc @@ -55,7 +55,10 @@ // own demangler (libc++abi's implementation could be adapted so that // it does not allocate). For now, we just call it anyway, and we leak // the returned value. - if (__cxxabiv1::__cxa_demangle) + // Explicitly check for mangled external names (starting with "_Z") as + // __cxa_demangle also handles type mangling, which conflicts with + // unmangled names such as "f" or "m". + if (__cxxabiv1::__cxa_demangle && name[0] == '_' && name[1] == 'Z') if (const char *demangled_name = __cxxabiv1::__cxa_demangle(name, 0, 0, 0)) return demangled_name;