[PATCH] D21378: [asan] suppress new-delete-type-mismatch per ASAN_OPTIONS suppressions settings

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 10:50:48 PDT 2016


kcc added reviewers: eugenis, vitalybuka.
kcc added a comment.

adding more reviewers as I'll be OOO.

In general, I don't mind, but see my comments.


================
Comment at: test/asan/TestCases/allocator-suppressions.cc:1
@@ +1,2 @@
+// Check that without suppressions, we catch the issue.
+// RUN: %clangxx_asan -fsized-deallocation %s -o %t
----------------
this test may need to be moved to test/asan/TestCases/Linux
or simply be made part of test/asan/TestCases/Linux/new_delete_mismatch.cc
There were problems with new-delete mismatch on other platforms due to ]
different interception mechanisms. 

Also, a better test would have to bugs, one suppressed and one not. 
Otherwise we may miss a bug where a suppression will match any stack trace. 

================
Comment at: test/asan/TestCases/allocator-suppressions.cc:4
@@ +3,3 @@
+// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-FAIL %s
+// RUN: echo "interceptor_via_fun:fail_function" > %t.supp
+// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --allow-empty --check-prefix=CHECK-IGNORE %s
----------------
the bug type prefix should clearly be different (new_delete_type_mismatch or some such)


http://reviews.llvm.org/D21378





More information about the llvm-commits mailing list