[compiler-rt] [sanitizer][windows] report symbols in clang_rt. or \compiler-rt\lib\ as internal. (PR #84971)

Charlie Barto via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 11:58:03 PDT 2024


https://github.com/barcharcraz created https://github.com/llvm/llvm-project/pull/84971

This is the windows equivalent to the existing filters.

Work from https://github.com/llvm/llvm-project/pull/81677 that can be applied separately (and is actually not critical for that PR)

>From f20091e08a1fd149cf781bc43909a73f4e877d2a Mon Sep 17 00:00:00 2001
From: Charlie Barto <chbarto at microsoft.com>
Date: Tue, 6 Feb 2024 17:16:03 -0800
Subject: [PATCH] report symbols in clang_rt. or \compiler-rt\lib\ as internal.

This is the windows equivalent to the existing filters.
---
 .../lib/sanitizer_common/sanitizer_symbolizer_report.cpp      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
index f6b157c07c6557..ffbaf1468ec8ff 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
@@ -39,8 +39,12 @@ static bool FrameIsInternal(const SymbolizedStack *frame) {
                internal_strstr(file, "/include/c++/") ||
                internal_strstr(file, "/include/g++")))
     return true;
+  if (file && internal_strstr(file, "\\compiler-rt\\lib\\"))
+    return true;
   if (module && (internal_strstr(module, "libclang_rt.")))
     return true;
+  if (module && (internal_strstr(module, "clang_rt.")))
+    return true;
   return false;
 }
 



More information about the llvm-commits mailing list