Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lsan] Move allocator base to avoid conflict with high-entropy ASLR f…
…or x86-64 Linux This ports D148280 for ASan. On x86-64 Linux, when mmap_rnd_bits is set to 32 (the maximum `ARCH_MMAP_RND_BITS_MAX`), the allocator space `[kAllocatorSpace,kAllocatorSpace+kAllocatorSize)` collides with the PIE load base range (0x555555554000 upto `2**mmap_rnd_bits * pagesize` away), which can cause the allocation to fail. Using 0x500000000000ULL as the base address avoids this problem and works with AArch64 Linux and FreeBSD as well. While here, change s390x to use 0x500000000000ULL as well. See D78644 discussions that the address works. Reviewed By: thurston, vitalybuka Differential Revision: https://reviews.llvm.org/D148193
- Loading branch information