Skip to content

Commit b356b2b

Browse files
committed
Set allocator size and beginning
1 parent fd894f6 commit b356b2b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

compiler-rt/lib/asan/asan_allocator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ const uptr kAllocatorSpace = ~(uptr)0;
198198
# endif // SANITIZER_APPLE
199199

200200
# if defined(__powerpc64__)
201+
# if SANITIZER_AIX
202+
const uptr kAllocatorSize = 1ULL << 38; // 256G.
203+
# else
201204
const uptr kAllocatorSize = 0x20000000000ULL; // 2T.
205+
# endif
202206
typedef DefaultSizeClassMap SizeClassMap;
203207
# elif defined(__aarch64__) && SANITIZER_ANDROID
204208
// Android needs to support 39, 42 and 48 bit VMA.

compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ class SizeClassAllocator32 {
288288
uptr ComputeRegionId(uptr mem) const {
289289
if (SANITIZER_SIGN_EXTENDED_ADDRESSES)
290290
mem &= (kSpaceSize - 1);
291+
mem -= kSpaceBeg;
291292
const uptr res = mem >> kRegionSizeLog;
292293
CHECK_LT(res, kNumPossibleRegions);
293294
return res;

0 commit comments

Comments
 (0)