[compiler-rt] r174516 - [TSan] skip multiple internal frames, if necessary
Alexey Samsonov
samsonov at google.com
Wed Feb 6 08:28:05 PST 2013
Author: samsonov
Date: Wed Feb 6 10:28:05 2013
New Revision: 174516
URL: http://llvm.org/viewvc/llvm-project?rev=174516&view=rev
Log:
[TSan] skip multiple internal frames, if necessary
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc?rev=174516&r1=174515&r2=174516&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc Wed Feb 6 10:28:05 2013
@@ -167,9 +167,9 @@ static ReportStack *ChooseSummaryStack(c
return 0;
}
-static ReportStack *SkipTsanInternalFrame(ReportStack *ent) {
- if (FrameIsInternal(ent) && ent->next)
- return ent->next;
+ReportStack *SkipTsanInternalFrames(ReportStack *ent) {
+ while (FrameIsInternal(ent) && ent->next)
+ ent = ent->next;
return ent;
}
@@ -199,7 +199,7 @@ void PrintReport(const ReportDesc *rep)
for (uptr i = 0; i < rep->threads.Size(); i++)
PrintThread(rep->threads[i]);
- if (ReportStack *ent = SkipTsanInternalFrame(ChooseSummaryStack(rep)))
+ if (ReportStack *ent = SkipTsanInternalFrames(ChooseSummaryStack(rep)))
ReportErrorSummary(rep_typ_str, ent->file, ent->line, ent->func);
Printf("==================\n");
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h?rev=174516&r1=174515&r2=174516&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h Wed Feb 6 10:28:05 2013
@@ -560,6 +560,7 @@ bool IsFiredSuppression(Context *ctx,
const StackTrace &trace);
bool IsExpectedReport(uptr addr, uptr size);
bool FrameIsInternal(const ReportStack *frame);
+ReportStack *SkipTsanInternalFrames(ReportStack *ent);
#if defined(TSAN_DEBUG_OUTPUT) && TSAN_DEBUG_OUTPUT >= 1
# define DPrintf Printf
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc?rev=174516&r1=174515&r2=174516&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_report.cc Wed Feb 6 10:28:05 2013
@@ -520,17 +520,14 @@ static bool IsJavaNonsense(const ReportD
&& frame->module == 0)) {
return true;
}
- if (FrameIsInternal(frame)) {
- frame = frame->next;
- if (frame == 0
- || (frame->func == 0 && frame->file == 0 && frame->line == 0
- && frame->module == 0)) {
- if (frame) {
- FiredSuppression supp = {rep->typ, frame->pc};
- CTX()->fired_suppressions.PushBack(supp);
- }
- return true;
- }
+ frame = SkipTsanInternalFrames(frame);
+ if (frame->next == 0
+ || (frame->func == 0 && frame->file == 0 && frame->line == 0
+ && frame->module == 0)) {
+ CHECK(frame);
+ FiredSuppression supp = {rep->typ, frame->pc};
+ CTX()->fired_suppressions.PushBack(supp);
+ return true;
}
}
return false;
More information about the llvm-commits
mailing list