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 | b2f75136d1f0c5a9f4a9695acbfde28e600553b3 (patch) | |
tree | 694105605315c4f856feaf0b711c50ef84bf16f8 /compiler-rt/lib/asan | |
parent | 1e89f53902f23d19edc2a22aca098ad58c2c026d (diff) | |
download | bcm5719-llvm-b2f75136d1f0c5a9f4a9695acbfde28e600553b3.tar.gz bcm5719-llvm-b2f75136d1f0c5a9f4a9695acbfde28e600553b3.zip |
[asan] Fix silly error when reporting multiple ASan errors in parallel.
llvm-svn: 253022
Diffstat (limited to 'compiler-rt/lib/asan')
-rw-r--r-- | compiler-rt/lib/asan/asan_report.cc | 5 |
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. |