diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2024-11-06 17:35:46 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2024-11-12 21:56:06 +0800 |
commit | 4d2cd304714fddc8a995fc0311090fce7e70c122 (patch) | |
tree | 0a64c31d414161649bfd6aab57faa33ca8a5ba75 | |
parent | b53f7de3e6205f76a794e159a282193e2afaad16 (diff) | |
download | gcc-4d2cd304714fddc8a995fc0311090fce7e70c122.zip gcc-4d2cd304714fddc8a995fc0311090fce7e70c122.tar.gz gcc-4d2cd304714fddc8a995fc0311090fce7e70c122.tar.bz2 |
libsanitizer: Improve FrameIsInternal
`FrameIsInternal` is a function that improves report quality by filtering out
internal functions from the sanitizer, allowing it to point to a more precise
root cause. However, the current checks are mostly specific to compiler-rt,
so we are adding a few more rules to enhance the filtering for libsanitizer as
well.
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_symbolizer_report.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libsanitizer/sanitizer_common/sanitizer_symbolizer_report.cpp b/libsanitizer/sanitizer_common/sanitizer_symbolizer_report.cpp index 351e00d..80ae31e 100644 --- a/libsanitizer/sanitizer_common/sanitizer_symbolizer_report.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_symbolizer_report.cpp @@ -41,10 +41,18 @@ static bool FrameIsInternal(const SymbolizedStack *frame) { return true; if (file && internal_strstr(file, "\\compiler-rt\\lib\\")) return true; + if (file && internal_strstr(file, "\\libsanitizer\\")) + return true; if (module && (internal_strstr(module, "libclang_rt."))) return true; if (module && (internal_strstr(module, "clang_rt."))) return true; + if (module && (internal_strstr(module, "libtsan.") + || internal_strstr(module, "libhwasan.") + || internal_strstr(module, "liblsan.") + || internal_strstr(module, "libasan.") + || internal_strstr(module, "libubsan."))) + return true; return false; } |