[compiler-rt] [sanitizer] Handle Gentoo's libstdc++ path (PR #79264)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 00:29:03 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Sam James (thesamesam)
<details>
<summary>Changes</summary>
On Gentoo, libc++ is indeed in /usr/include/c++/*, but libstdc++ is at e.g. /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14.
Use '/include/g++' as it should be unique enough.
See https://github.com/llvm/llvm-project/pull/78534#issuecomment-1904145839.
---
Full diff: https://github.com/llvm/llvm-project/pull/79264.diff
1 Files Affected:
- (modified) compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp (+2-1)
``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
index 8438e019591b58..b700eca3b7beb0 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
@@ -35,7 +35,8 @@ static bool FrameIsInternal(const SymbolizedStack *frame) {
const char *file = frame->info.file;
const char *module = frame->info.module;
if (file && (internal_strstr(file, "/compiler-rt/lib/") ||
- internal_strstr(file, "/include/c++/")))
+ internal_strstr(file, "/include/c++/") ||
+ internal_strstr(file, "/include/g++")))
return true;
if (module && (internal_strstr(module, "libclang_rt.")))
return true;
``````````
</details>
https://github.com/llvm/llvm-project/pull/79264
More information about the llvm-commits
mailing list