[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
This commit is contained in:
Mohit K. Bhakkad 2016-02-04 05:28:48 +00:00
parent adaaccc23b
commit 4199f3df29
1 changed files with 2 additions and 2 deletions

View File

@ -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