Skip to content

Conversation

@jakeegan
Copy link
Member

@jakeegan jakeegan commented Jul 17, 2025

287b24e moved the GetGlobalAddressInformation call earlier, but this broke a chromium test, so make this workaround for AIX only.

@github-actions
Copy link

github-actions bot commented Jul 17, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@jakeegan jakeegan marked this pull request as ready for review July 17, 2025 04:16
@jakeegan jakeegan requested review from ZequanWu and vitalybuka July 17, 2025 04:16
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2025

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

Author: Jake Egan (jakeegan)

Changes

287b24e moved the GetGlobalAddressInformation call earlier, but this broke a chromium test, so make this workaround for AIX only.


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

1 Files Affected:

  • (modified) compiler-rt/lib/asan/asan_descriptions.cpp (+9)
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;

@jakeegan jakeegan merged commit 4e6b843 into llvm:main Jul 17, 2025
9 checks passed
@jakeegan jakeegan deleted the reorder branch July 17, 2025 19:50
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.

4 participants