From 4199f3df29e50353bfa55bb410210d416b93f834 Mon Sep 17 00:00:00 2001 From: "Mohit K. Bhakkad" Date: Thu, 4 Feb 2016 05:28:48 +0000 Subject: [PATCH] [TSan] Fix PrintMatchedSuppressions: Read hit count for suppression atomically Reviewers: dvyukov. Subscribers: jaydeep, sagar, dsanders, llvm-commits. Differential Revision: http://reviews.llvm.org/D16845 llvm-svn: 259755 --- compiler-rt/lib/tsan/rtl/tsan_suppressions.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc b/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc index 8754b61c60cd..b992d78f8cb5 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc @@ -159,8 +159,8 @@ void PrintMatchedSuppressions() { Printf("ThreadSanitizer: Matched %d suppressions (pid=%d):\n", hit_count, (int)internal_getpid()); for (uptr i = 0; i < matched.size(); i++) { - Printf("%d %s:%s\n", matched[i]->hit_count, matched[i]->type, - matched[i]->templ); + Printf("%d %s:%s\n", atomic_load_relaxed(&matched[i]->hit_count), + matched[i]->type, matched[i]->templ); } } } // namespace __tsan