[compiler-rt] 4e6b843 - [asan] Revert global check for non-AIX (#149245)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 12:50:47 PDT 2025


Author: Jake Egan
Date: 2025-07-17T15:50:44-04:00
New Revision: 4e6b843cf59735ffb7092edd178e4b03433a44df

URL: https://github.com/llvm/llvm-project/commit/4e6b843cf59735ffb7092edd178e4b03433a44df
DIFF: https://github.com/llvm/llvm-project/commit/4e6b843cf59735ffb7092edd178e4b03433a44df.diff

LOG: [asan] Revert global check for non-AIX  (#149245)

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

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_descriptions.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/asan_descriptions.cpp b/compiler-rt/lib/asan/asan_descriptions.cpp
index 0c30959b23e28..18c2a6c571c1f 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 
diff erent 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,14 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
     return;
   }
 
+// GetGlobalAddressInformation is called earlier on AIX due to a workaround
+#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;


        


More information about the llvm-commits mailing list