Skip to content

Commit 232dffd

Browse files
committed
[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. See llvm#78534 (comment).
1 parent 3c20e25 commit 232dffd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ static bool FrameIsInternal(const SymbolizedStack *frame) {
3535
const char *file = frame->info.file;
3636
const char *module = frame->info.module;
3737
if (file && (internal_strstr(file, "/compiler-rt/lib/") ||
38-
internal_strstr(file, "/include/c++/")))
38+
internal_strstr(file, "/include/c++/") ||
39+
internal_strstr(file, "/include/g++")))
3940
return true;
4041
if (module && (internal_strstr(module, "libclang_rt.")))
4142
return true;

0 commit comments

Comments
 (0)