[asan] Revert global check for non-AIX #149245
Merged
Conversation
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Member
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Jake Egan (jakeegan) Changes287b24e moved the Full diff: https://github.com/llvm/llvm-project/pull/149245.diff 1 Files Affected:
diff --git a/compiler-rt/lib/asan/asan_descriptions.cpp b/compiler-rt/lib/asan/asan_descriptions.cpp
index 0c30959b23e28..3d5cc28fab1ee 100644
--- a/compiler-rt/lib/asan/asan_descriptions.cpp
+++ b/compiler-rt/lib/asan/asan_descriptions.cpp
@@ -449,10 +449,12 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
// are put to the STACK region for unknown reasons. Check global first can
// workaround this issue.
// TODO: Look into whether there's a different solution to this problem.
+#if SANITIZER_AIX
if (GetGlobalAddressInformation(addr, access_size, &data.global)) {
data.kind = kAddressKindGlobal;
return;
}
+#endif
if (GetHeapAddressInformation(addr, access_size, &data.heap)) {
data.kind = kAddressKindHeap;
@@ -471,6 +473,13 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
return;
}
+#if !SANITIZER_AIX
+ if (GetGlobalAddressInformation(addr, access_size, &data.global)) {
+ data.kind = kAddressKindGlobal;
+ return;
+ }
+#endif
+
data.kind = kAddressKindWild;
data.wild.addr = addr;
data.wild.access_size = access_size;
|
ZequanWu
approved these changes
Jul 17, 2025
fmayer
approved these changes
Jul 17, 2025
This was referenced Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
287b24e moved the
GetGlobalAddressInformationcall earlier, but this broke a chromium test, so make this workaround for AIX only.