Fix an all-platforms bug introduced by the recent overhaul of function
interception and wrapping.  This was causing failures matching
function names in suppressions to function names in backtraces when
the latter names were Z-encoded (eg malloc), which typically caused
all leak suppressions to fail because they contain names such as
malloc, which are Z-encoded.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5548 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c
index 62074ca..6dc3bb8 100644
--- a/coregrind/m_errormgr.c
+++ b/coregrind/m_errormgr.c
@@ -1110,8 +1110,12 @@
             break; 
 
          case FunName: 
-            // Nb: mangled names used in suppressions
-            if (!VG_(get_fnname_nodemangle)(a, caller_name, ERRTXT_LEN))
+            // Nb: mangled names used in suppressions.  Do, though,
+            // Z-demangle them, since otherwise it's possible to wind
+            // up comparing "malloc" in the suppression against
+            // "_vgrZU_libcZdsoZa_malloc" in the backtrace, and the
+            // two of them need to be made to match.
+            if (!VG_(get_fnname_Z_demangle_only)(a, caller_name, ERRTXT_LEN))
                VG_(strcpy)(caller_name, "???");
             break;
          default: VG_(tool_panic)("supp_matches_callers");