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

Alexander Potapenko via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 05:02:51 PST 2015


glider accepted this revision.
glider added a comment.

LGTM


================
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;
----------------
dvyukov wrote:
> 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)
s/NULL/not NULL

agreed


http://reviews.llvm.org/D14637





More information about the llvm-commits mailing list