llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) <details> <summary>Changes</summary> Probably it's not important, as it should not happen, but if all frames are internal we should pick top, not the bottom frame. --- Full diff: https://github.com/llvm/llvm-project/pull/77145.diff 1 Files Affected: - (modified) compiler-rt/lib/tsan/rtl/tsan_report.cpp (+5-4) ``````````diff diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_report.cpp index cdcc20b9758f48..c6b764bd891752 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_report.cpp +++ b/compiler-rt/lib/tsan/rtl/tsan_report.cpp @@ -275,7 +275,7 @@ static ReportStack *ChooseSummaryStack(const ReportDesc *rep) { static bool FrameIsInternal(const SymbolizedStack *frame) { if (!frame) - return false; + return true; const char *file = frame->info.file; const char *module = frame->info.module; if (file && (internal_strstr(file, "/compiler-rt/lib/"))) @@ -286,9 +286,10 @@ static bool FrameIsInternal(const SymbolizedStack *frame) { } static SymbolizedStack *SkipTsanInternalFrames(SymbolizedStack *frames) { - while (FrameIsInternal(frames) && frames->next) - frames = frames->next; - return frames; + for (SymbolizedStack *f = frames; f; f = f->next) + if (!FrameIsInternal(f)) + return f; + return frames; // Fallback to the top frame. } void PrintReport(const ReportDesc *rep) { `````````` </details> https://github.com/llvm/llvm-project/pull/77145 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits