[compiler-rt] r253022 - [asan] Fix silly error when reporting multiple ASan errors in parallel.
Yury Gribov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 01:46:12 PST 2015
Author: ygribov
Date: Fri Nov 13 03:46:12 2015
New Revision: 253022
URL: http://llvm.org/viewvc/llvm-project?rev=253022&view=rev
Log:
[asan] Fix silly error when reporting multiple ASan errors in parallel.
Modified:
compiler-rt/trunk/lib/asan/asan_report.cc
Modified: compiler-rt/trunk/lib/asan/asan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_report.cc?rev=253022&r1=253021&r2=253022&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Fri Nov 13 03:46:12 2015
@@ -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.
More information about the llvm-commits
mailing list