Explicitly check that the symbol starts with "_Z" to only demangle
modern style (gnu_v3) mangled C++ (and Rust) symbols.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16118
371412 Rename wrap_sys_shmat to sys_shmat like other wrappers
371869 support '%' in symbol Z-encoding
+372120 c++ demangler demangles symbols which are not c++
}
/* Possibly undo (1) */
- if (do_cxx_demangling && VG_(clo_demangle)) {
+ if (do_cxx_demangling && VG_(clo_demangle)
+ && orig != NULL && orig[0] == '_' && orig[1] == 'Z') {
/* !!! vvv STATIC vvv !!! */
static HChar* demangled = NULL;
/* !!! ^^^ STATIC ^^^ !!! */