[PATCH] D31449: [tsan] Don't report deadlocks when ignore_reads_and_writes > 0

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 05:49:03 PDT 2017


dvyukov added a comment.

When an interceptor comes from a non-instrumented library, we set thr->in_ignored_lib=true. This causes SCOPED_TSAN_INTERCEPTOR to call the real function an skip all tsan processing. Consequently mutex lock/unlock operations in non-instrumented libraries are not handled by tsan already. So it's not clear to me how you get deadlock reports there. What am I missing?

One problem is if one mutex in deadlock cycles is taken from non-instrumented code, but the second mutex is taken from instrumented code, tsan won't report the deadlock on the mutex operations coming from non-instrumented code, but it will still report it on operations coming from instrumented code. So it seems to me that a better way to handle it is to hide all mutex operations in non-instrumented code from tsan. But it already seems to be happening, so I am confused.


Repository:
  rL LLVM

https://reviews.llvm.org/D31449





More information about the llvm-commits mailing list