[compiler-rt] r314007 - [asan] Fix unlocking order for CommonSanitizerReportMutex and reporting_thread_tid_

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 11:31:51 PDT 2017


Author: vitalybuka
Date: Fri Sep 22 11:31:51 2017
New Revision: 314007

URL: http://llvm.org/viewvc/llvm-project?rev=314007&view=rev
Log:
[asan] Fix unlocking order for CommonSanitizerReportMutex and reporting_thread_tid_

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=314007&r1=314006&r2=314007&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_report.cc Fri Sep 22 11:31:51 2017
@@ -205,8 +205,8 @@ class ScopedInErrorReport {
       Die();
     }
 
-    atomic_store_relaxed(&reporting_thread_tid_, kUnclaimedTid);
     CommonSanitizerReportMutex.Unlock();
+    atomic_store_relaxed(&reporting_thread_tid_, kUnclaimedTid);
   }
 
   void ReportError(const ErrorDescription &description) {




More information about the llvm-commits mailing list