aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-01-24 08:23:03 +0000
committerTom Stellard <tstellar@redhat.com>2024-01-30 15:47:38 -0800
commit400a02bb281ba0de79211ab53d931e44dd76733f (patch)
treed42fa82f805086fbf04e1173d0b9feac694b1d4a /compiler-rt
parentfe2fca3b8ec29ed01eb8350e6358c06da3a705fc (diff)
downloadllvm-400a02bb281ba0de79211ab53d931e44dd76733f.zip
llvm-400a02bb281ba0de79211ab53d931e44dd76733f.tar.gz
llvm-400a02bb281ba0de79211ab53d931e44dd76733f.tar.bz2
[sanitizer] Handle Gentoo's libstdc++ path
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. Note that the omission of a trailing slash is intentional to match g++-*. See https://github.com/llvm/llvm-project/pull/78534#issuecomment-1904145839. Reviewed by: mgorny Closes: https://github.com/llvm/llvm-project/pull/79264 Signed-off-by: Sam James <sam@gentoo.org> (cherry picked from commit e8f882f83acf30d9b4da8846bd26314139660430)
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
index 8438e01..f6b157c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
@@ -34,8 +34,10 @@ static bool FrameIsInternal(const SymbolizedStack *frame) {
return true;
const char *file = frame->info.file;
const char *module = frame->info.module;
+ // On Gentoo, the path is g++-*, so there's *not* a missing /.
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;