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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 17:51:36 PDT 2017


kubamracek added a comment.

> remember that deadlock detector does not require instrumentation at all.

Unfortunately, the fact that TSan is able to detect issues on non-instrumented code brings more harm than benefits, at least on macOS/iOS.  Almost all reports that don't come from instrumented code are false positives.  Our users are usually fine with recompiling their source code with instrumentation and they expect to only find issues with their code, not some 3rd party library.  Same applies to mutexes and deadlocks.  If a user wants to see reports from non-instrumented libraries, they can just turn the `ignore_noninstrumented_modules` flag to zero.

> Can we solve it with a blacklist?

Maybe, but to use libignore (which I would need for this), the same patch would be needed.  Libignore currently sets `ignore_reads_and_writes`, which doesn't prevent reporting deadlocks.

> it is very un-intuitive that reads/writes affects deadlock checker.

That's why the patches renamed `ignore_reads_and_writes` to `ignore_reads_writes_and_reports`.  Would it help if I added a separate `ignore_reports` (or even `ignore_deadlocks`) flag?


Repository:
  rL LLVM

https://reviews.llvm.org/D31449





More information about the llvm-commits mailing list