[compiler-rt] [tsan] Generalize FrameIsInternal (PR #77143)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 14:07:11 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Vitaly Buka (vitalybuka)

<details>
<summary>Changes</summary>

Prepare to move this into sanitizer_common.


---
Full diff: https://github.com/llvm/llvm-project/pull/77143.diff


1 Files Affected:

- (modified) compiler-rt/lib/tsan/rtl/tsan_report.cpp (+2-6) 


``````````diff
diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
index 35cb6710a54fa4..167e4be4fc0e26 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_report.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
@@ -278,13 +278,9 @@ static bool FrameIsInternal(const SymbolizedStack *frame) {
     return false;
   const char *file = frame->info.file;
   const char *module = frame->info.module;
-  if (file != 0 &&
-      (internal_strstr(file, "tsan_interceptors_posix.cpp") ||
-       internal_strstr(file, "tsan_interceptors_memintrinsics.cpp") ||
-       internal_strstr(file, "sanitizer_common_interceptors.inc") ||
-       internal_strstr(file, "tsan_interface_")))
+  if (file != 0 && (internal_strstr(file, "/compiler-rt/lib/")))
     return true;
-  if (module != 0 && (internal_strstr(module, "libclang_rt.tsan_")))
+  if (module != 0 && (internal_strstr(module, "libclang_rt.")))
     return true;
   return false;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/77143


More information about the llvm-commits mailing list