@@ -211,10 +211,10 @@ bool GetStackAddressInformation(uptr addr, uptr access_size,
211
211
descr->frame_pc = access.frame_pc ;
212
212
descr->frame_descr = access.frame_descr ;
213
213
214
- #if SANITIZER_PPC64V1
215
- // On PowerPC64 ELFv1, the address of a function actually points to a
216
- // three-doubleword data structure with the first field containing
217
- // the address of the function's code.
214
+ #if SANITIZER_PPC64V1 || SANITIZER_AIX
215
+ // On PowerPC64 ELFv1 or AIX , the address of a function actually points to a
216
+ // three-doubleword (or three-word for 32-bit AIX) data structure with
217
+ // the first field containing the address of the function's code.
218
218
descr->frame_pc = *reinterpret_cast <uptr *>(descr->frame_pc );
219
219
#endif
220
220
descr->frame_pc += 16 ;
@@ -444,6 +444,16 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
444
444
data.kind = kAddressKindShadow ;
445
445
return ;
446
446
}
447
+
448
+ // Check global first. On AIX, some global data defined in shared libraries
449
+ // are put to the STACK region for unknown reasons. Check global first can
450
+ // workaround this issue.
451
+ // TODO: Look into whether there's a different solution to this problem.
452
+ if (GetGlobalAddressInformation (addr, access_size, &data.global )) {
453
+ data.kind = kAddressKindGlobal ;
454
+ return ;
455
+ }
456
+
447
457
if (GetHeapAddressInformation (addr, access_size, &data.heap )) {
448
458
data.kind = kAddressKindHeap ;
449
459
return ;
@@ -461,10 +471,6 @@ AddressDescription::AddressDescription(uptr addr, uptr access_size,
461
471
return ;
462
472
}
463
473
464
- if (GetGlobalAddressInformation (addr, access_size, &data.global )) {
465
- data.kind = kAddressKindGlobal ;
466
- return ;
467
- }
468
474
data.kind = kAddressKindWild ;
469
475
data.wild .addr = addr;
470
476
data.wild .access_size = access_size;
0 commit comments