[compiler-rt] assert max virtual address is <= mmap range size
authorEmily Shi <code@emi.sh>
Sat, 10 Apr 2021 00:47:54 +0000 (17:47 -0700)
committerEmily Shi <code@emi.sh>
Mon, 19 Apr 2021 21:01:07 +0000 (14:01 -0700)
commitcc2b62a06e616c6406b0f1387625b50d3d0639ad
tree30e62b9495db4cc7c1f6c30308ac1539483f36ba
parentd6fde913790db898e72e27b51defbc7442f3418a
[compiler-rt] assert max virtual address is <= mmap range size

If these sizes do not match, asan will not work as expected.

If possible, assert at compile time that the vm size is less than or equal to mmap range.
If a compile time assert is not possible, check at run time (for iOS)

rdar://76477969

Reviewed By: delcypher, yln

Differential Revision: https://reviews.llvm.org/D100239
compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp