[PATCH] D15080: [asan] Reports suppressions for ASan recovery mode (compiler-rt part).

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 23:34:31 PST 2015


kcc added inline comments.

================
Comment at: lib/asan/asan_report.cc:34
@@ -33,1 +33,3 @@
 static BlockingMutex error_message_buf_mutex(LINKER_INITIALIZED);
+const unsigned kAsanBuggyPcPoolSize = 25;
+__sanitizer::atomic_uint64_t AsanBuggyPcPool[kAsanBuggyPcPoolSize];
----------------
use static for all global vars here, please. 

================
Comment at: lib/sanitizer_common/sanitizer_flags.inc:197
@@ +196,2 @@
+            "Deduplicate multiple reports for single source location in "
+            "halt_on_error = false mode.")
----------------
no spaces around =

================
Comment at: test/asan/TestCases/halt_on_error-2.c:1
@@ +1,2 @@
+// Test reports dedupication for recovery mode.
+//
----------------
Can we rename this test to have suppress_equal_pcs in the name (e.g. halt_on_error_suppress_equal_pcs.c).
Having _2 in the name is not helpful. 

================
Comment at: test/asan/TestCases/halt_on_error-2.c:5
@@ +4,3 @@
+// RUN: %env_asan_opts=halt_on_error=false %run %t 2>&1 | FileCheck %s
+// RUN: %env_asan_opts=halt_on_error=false not %run %t 1 > %t.log 2>&1
+// RUN: [ $(grep -c 'ERROR: AddressSanitizer: stack-buffer-overflow' %t.log) -eq 25 ]
----------------
I want to have two more RUN lines here: 
one that has suppress_equal_pcs=true and checks the suppress_equal_pcs=true is the same as default.
another that has suppress_equal_pcs=false and checks that this is different from default. 


http://reviews.llvm.org/D15080





More information about the llvm-commits mailing list