summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/asan/asan_report.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_report.cc b/compiler-rt/lib/asan/asan_report.cc
index c18ca964ad9..a89451906a5 100644
--- a/compiler-rt/lib/asan/asan_report.cc
+++ b/compiler-rt/lib/asan/asan_report.cc
@@ -634,9 +634,10 @@ class ScopedInErrorReport {
// ASan found two bugs in different threads simultaneously.
u32 current_tid = GetCurrentTidOrInvalid();
- if (current_tid == reporting_thread_tid_ || current_tid == kInvalidTid) {
+ if (reporting_thread_tid_ == current_tid ||
+ reporting_thread_tid_ == kInvalidTid) {
// This is either asynch signal or nested error during error reporting.
- // Fail fast to avoid deadlocks.
+ // Fail simple to avoid deadlocks in Report().
// Can't use Report() here because of potential deadlocks
// in nested signal handlers.
OpenPOWER on IntegriCloud