Skip to content

Commit 4e6b843

Browse files
authored
[asan] Revert global check for non-AIX (#149245)
287b24e moved the `GetGlobalAddressInformation` call earlier, but this broke a chromium test, so make this workaround for AIX only.
1 parent 7e105fb commit 4e6b843

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

compiler-rt/lib/asan/asan_descriptions.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,12 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
449449
// are put to the STACK region for unknown reasons. Check global first can
450450
// workaround this issue.
451451
// TODO: Look into whether there's a different solution to this problem.
452+
#if SANITIZER_AIX
452453
if (GetGlobalAddressInformation(addr, access_size, &data.global)) {
453454
data.kind = kAddressKindGlobal;
454455
return;
455456
}
457+
#endif
456458

457459
if (GetHeapAddressInformation(addr, access_size, &data.heap)) {
458460
data.kind = kAddressKindHeap;
@@ -471,6 +473,14 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
471473
return;
472474
}
473475

476+
// GetGlobalAddressInformation is called earlier on AIX due to a workaround
477+
#if !SANITIZER_AIX
478+
if (GetGlobalAddressInformation(addr, access_size, &data.global)) {
479+
data.kind = kAddressKindGlobal;
480+
return;
481+
}
482+
#endif
483+
474484
data.kind = kAddressKindWild;
475485
data.wild.addr = addr;
476486
data.wild.access_size = access_size;

0 commit comments

Comments
 (0)