[PATCH] D14637: [tsan] Don't demangle names not starting with "_Z"

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 04:58:43 PST 2015


dvyukov added inline comments.

================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc:51
@@ -50,1 +50,3 @@
 const char *DemangleCXXABI(const char *name) {
+  if (name[0] != '_' || name[1] != 'Z')
+    return name;
----------------
glider wrote:
> Please make sure name[1] is addressable (BTW do we always know name is not NULL?)
Assuming that name is NULL, this check is OK. If the string of zero length we will bail out after checking name[0] (which is addressable and contains 0)


http://reviews.llvm.org/D14637





More information about the llvm-commits mailing list