tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick upstream 224508 and 224755.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 11 Mar 2015 19:20:03 +0000 (19:20 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Wed, 11 Mar 2015 19:20:03 +0000 (19:20 +0000)
2015-03-11  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * tsan/tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick
        upstream 224508 and 224755.

From-SVN: r221356

libsanitizer/ChangeLog
libsanitizer/tsan/tsan_rtl_report.cc

index 129de3b20d500555ec11293ff1e24cbc9ca8c25c..6086c09c46cdcff48c50c2a9225aed48c3538ae3 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-11  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       * tsan/tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick
+       upstream 224508 and 224755.
+
 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR sanitizer/63958
index 11ec8381de6e2ce05a58ec466f9126077cb0f229..f86cfd4681de8ef12aafa8033722a2a8b9d836c6 100644 (file)
@@ -242,7 +242,8 @@ ThreadContext *IsThreadStackOrTls(uptr addr, bool *is_stack) {
 
 void ScopedReport::AddThread(int unique_tid, bool suppressable) {
 #ifndef TSAN_GO
-  AddThread(FindThreadByUidLocked(unique_tid), suppressable);
+  if (const ThreadContext *tctx = FindThreadByUidLocked(unique_tid))
+    AddThread(tctx, suppressable);
 #endif
 }