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

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 08:34:39 PST 2015


m.ostepenko updated this revision to Diff 41883.
m.ostepenko added a comment.

Updating the diff.

It seems we cannot get rid of races without using mutex, because we should protect access to different parts of AsanBuggyPcPool array. However, using a mutex here is undesirable due to performance issue. So, for now, I see such alternatives how to implement suppression:

1. Use mutex. This is probably an overkill.
2. Use atomic pc_num counter and non-atomic accesses to AsanBuggyPcPool. Here, we would have races on accesses to AsanBuggyPcPool, that may lead to duplication in reports (e.g. when 2 threads with same PC are searching in AsanBuggyPcPool and no one hasn't updated the array yet). Also, we'll need to add one additional check for AsanBuggyPcPool overflow before updating the pool because it is possible that multiple threads would try to update it simultaneously.

This patch implements the second approach for now, thought it's OK to have few duplications in favor of performance.

Konstantin, what do you think about it?


http://reviews.llvm.org/D15080

Files:
  lib/asan/asan_rtl.cc
  lib/sanitizer_common/sanitizer_flags.inc
  test/asan/TestCases/Posix/halt_on_error-signals.c
  test/asan/TestCases/Posix/halt_on_error-torture.cc
  test/asan/TestCases/halt_on_error-2.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15080.41883.patch
Type: text/x-patch
Size: 8473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151204/7f738388/attachment.bin>


More information about the llvm-commits mailing list