Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sanitizer][windows] report symbols in clang_rt. or \compiler-rt\lib\ as internal. #84971

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

barcharcraz
Copy link
Contributor

This is the windows equivalent to the existing filters.

Work from #81677 that can be applied separately (and is actually not critical for that PR)

This is the windows equivalent to the existing filters.
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 12, 2024

@llvm/pr-subscribers-platform-windows

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

Author: Charlie Barto (barcharcraz)

Changes

This is the windows equivalent to the existing filters.

Work from #81677 that can be applied separately (and is actually not critical for that PR)


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

1 Files Affected:

  • (modified) compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp (+4)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
index f6b157c07c6557..ffbaf1468ec8ff 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
@@ -39,8 +39,12 @@ static bool FrameIsInternal(const SymbolizedStack *frame) {
                internal_strstr(file, "/include/c++/") ||
                internal_strstr(file, "/include/g++")))
     return true;
+  if (file && internal_strstr(file, "\\compiler-rt\\lib\\"))
+    return true;
   if (module && (internal_strstr(module, "libclang_rt.")))
     return true;
+  if (module && (internal_strstr(module, "clang_rt.")))
+    return true;
   return false;
 }
 

if (module && (internal_strstr(module, "libclang_rt.")))
return true;
if (module && (internal_strstr(module, "clang_rt.")))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is libclang_rt. redundant then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean not if you happened to build the library with that name....

It might show up for cygwin or mingw builds. I don't see a reason to do platform specific preprocessing here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new if (module && (internal_strstr(module, "clang_rt."))) will match existing libclang

@barcharcraz barcharcraz merged commit dcd9f49 into llvm:main Mar 13, 2024
8 checks passed
@vitalybuka
Copy link
Collaborator

@vitalybuka
Copy link
Collaborator

Ping

@barcharcraz
Copy link
Contributor Author

Ping

thanks, looking now.

@barcharcraz
Copy link
Contributor Author

fixed: #85137

vitalybuka pushed a commit that referenced this pull request Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants