[PATCH] [UBSAN] Suppress an error report with given type information
Byoungyoung Lee
byoungyoung at chromium.org
Mon Aug 4 17:20:04 PDT 2014
================
Comment at: lib/ubsan/ubsan_handlers_cxx.cc:37
@@ +36,3 @@
+ DynamicTypeInfo DTI = getDynamicTypeInfo((void*)Pointer);
+ const char *MostDerivedTypeName = DTI.getMostDerivedTypeName();
+
----------------
Alexey Samsonov wrote:
> Byoungyoung Lee wrote:
> > Alexey Samsonov wrote:
> > > why not create and pass MangledName around?
> > As the mangled name was not straight forward to us to blacklist (or suppress here), we actually wanted to bring up the discussion to see whether it's possible to use un-mangled name. But let me fix this as you suggest as it clearly breaks the consistency.
> I mean, use the "MangledName" object, which is a strong typedef for "const char *".
> But, yes, I believe that we should eventually be able to blacklist/suppress *demangled* names. That's a different issue, though.
Fixed as commented --- introduced MDTMangledName variable.
================
Comment at: test/ubsan/TestCases/TypeCheck/vptr.cpp:15
@@ +14,3 @@
+// RUN: (echo "vptr_check:S"; echo "vptr_check:T"; echo "vptr_check:U") > %t.supp
+// RUN: (echo "" ; ASAN_OPTIONS="$ASAN_OPTIONS suppressions=%t.supp" UBSAN_OPTIONS=suppressions=%t.supp %run %t mS 2>&1) | FileCheck %s --check-prefix=CHECK-SUPPRESS
+// RUN: (echo "" ; ASAN_OPTIONS="$ASAN_OPTIONS suppressions=%t.supp" UBSAN_OPTIONS=suppressions=%t.supp %run %t fS 2>&1) | FileCheck %s --check-prefix=CHECK-SUPPRESS
----------------
Alexey Samsonov wrote:
> Byoungyoung Lee wrote:
> > Alexey Samsonov wrote:
> > > echo ""; remains a mystery for me.
> > It seems my previous comments were not properly sent to you. These echo commands were prepended to generate non-empty outputs, because FileCheck complains otherwise due to the empty outputs.
> Oh god. Consider the following approach: build the code with -fno-sanitize-recover and simply execute the binaries, without piping the output to FileCheck (i.e. just check that a binary executes successfully and returns zero exit code).
Ughh... I didn't know what this "RUN" was actually doing and checking. I'm sorry for the mess.
http://reviews.llvm.org/D4702
More information about the llvm-commits
mailing list