[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
Sun Apr 2 03:08:27 PDT 2017


dvyukov added a comment.

1. s/ignore_reads_and_writes/ignore_reads_writes_and_reports/ does not look like a good idea to me, because these things are not necessary related. If we go this route we need separate flags.
2. From the description it seems that your intention is to ignore all reports, but you are ignoring only deadlocks. There are many more types of reports.

How about:

   bool OutputReport(ThreadState *thr, const ScopedReport &srep) {
  -  if (!flags()->report_bugs)
  +  if (!flags()->report_bugs || thr->suppress_reports)
       return false;
     atomic_store_relaxed(&ctx->last_symbolize_time_ns, NanoTime());
     const ReportDesc *rep = srep.GetReport();

This will be a minimalistic change and it will suppress all reports and won't affect anything other than non-instrumented libs.
But note that it will effectively nullify the external API thing as it will never report anything.


Repository:
  rL LLVM

https://reviews.llvm.org/D31449





More information about the llvm-commits mailing list