summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_rtl_report.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-02-06 14:24:00 +0000
committerKostya Serebryany <kcc@google.com>2013-02-06 14:24:00 +0000
commit2f588f9d3417aa107ebbbd8830f97501023d3f40 (patch)
treedd47b0935d384ec0081dade0d03358ed5bc62aa1 /lib/tsan/rtl/tsan_rtl_report.cc
parent2673fd8406197c42f16cede6d287f72169298c2e (diff)
downloadcompiler-rt-2f588f9d3417aa107ebbbd8830f97501023d3f40.tar.gz
compiler-rt-2f588f9d3417aa107ebbbd8830f97501023d3f40.tar.bz2
compiler-rt-2f588f9d3417aa107ebbbd8830f97501023d3f40.tar.xz
[tsan] print error summary line
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl_report.cc')
-rw-r--r--lib/tsan/rtl/tsan_rtl_report.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/tsan/rtl/tsan_rtl_report.cc b/lib/tsan/rtl/tsan_rtl_report.cc
index 5fb8a6e2..65fe5448 100644
--- a/lib/tsan/rtl/tsan_rtl_report.cc
+++ b/lib/tsan/rtl/tsan_rtl_report.cc
@@ -496,6 +496,12 @@ bool IsFiredSuppression(Context *ctx,
return false;
}
+bool FrameIsInternal(const ReportStack *frame) {
+ return frame != 0 && frame->file != 0
+ && (internal_strstr(frame->file, "tsan_interceptors.cc") ||
+ internal_strstr(frame->file, "sanitizer_common_interceptors.inc"));
+}
+
// On programs that use Java we see weird reports like:
// WARNING: ThreadSanitizer: data race (pid=22512)
// Read of size 8 at 0x7d2b00084318 by thread 100:
@@ -513,9 +519,7 @@ static bool IsJavaNonsense(const ReportDesc *rep) {
&& frame->module == 0)) {
return true;
}
- if (frame != 0 && frame->file != 0
- && (internal_strstr(frame->file, "tsan_interceptors.cc") ||
- internal_strstr(frame->file, "sanitizer_common_interceptors.inc"))) {
+ if (FrameIsInternal(frame)) {
frame = frame->next;
if (frame == 0
|| (frame->func == 0 && frame->file == 0 && frame->line == 0