diff options
author | Yury Gribov <y.gribov@samsung.com> | 2015-11-13 09:46:12 +0000 |
---|---|---|
committer | Yury Gribov <y.gribov@samsung.com> | 2015-11-13 09:46:12 +0000 |
commit | 4ce0cc9df99f088ff7ebc64c213516a2db887e2e (patch) | |
tree | 7a62a594bfe9762dda1e7833cac6eb07ed84d9df /lib/asan | |
parent | 49fa60d6d997928af6458a05ce63253d2f1c3c40 (diff) |
[asan] Fix silly error when reporting multiple ASan errors in parallel.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan')
-rw-r--r-- | lib/asan/asan_report.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/asan/asan_report.cc b/lib/asan/asan_report.cc index c18ca964a..a89451906 100644 --- a/lib/asan/asan_report.cc +++ b/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. |