[PATCH] D15080: [asan] Reports suppressions for ASan recovery mode (compiler-rt part).
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 07:14:48 PST 2015
dvyukov added inline comments.
================
Comment at: lib/asan/asan_rtl.cc:116
@@ +115,3 @@
+// due to performance issue.
+static bool SuppressErrorReport(uptr pc) {
+ if (!common_flags()->suppress_equal_pcs) return false;
----------------
This is unnecessary complex and racy. And also produces excessive contention on AsanBuggyPcPool due to compare_exchange even when we are suppressing already reported pc. What you need is:
static bool SuppressErrorReport(uptr pc) {
for (unsigned i = 0; i < kAsanBuggyPcPoolSize; i++) {
u64 cmp = atomic_load_relaxed(&AsanBuggyPcPool[i]);
if (cmp == 0 && atomic_compare_exchange_strong(&AsanBuggyPcPool[i], cmp, pc, memory_order_relaxed))
return false;
if (cmp == pc)
return true;
}
Die();
}
http://reviews.llvm.org/D15080
More information about the llvm-commits
mailing list