If these sizes do not match, asan will not work as expected. Previously, we added compile-time checks for non-iOS platforms. We check at run time for iOS because we get the max VM size from the kernel at run time.
rdar://76477969
Differential D100784
[compiler-rt] check max address from kernel is <= mmap range size aralisza on Apr 19 2021, 12:19 PM. Authored by
Details If these sizes do not match, asan will not work as expected. Previously, we added compile-time checks for non-iOS platforms. We check at run time for iOS because we get the max VM size from the kernel at run time. rdar://76477969
Diff Detail
Event Timeline
Comment Actions LGTM apart from the description. The description probably should mention this is the runtime counterpart to the previous patch that added static checks. We have to do this check at runtime because we get the VM size from the kernel at runtime. |
Suggestion. Add a variable explicitly document our intent. There's a risk that someone might change the return value but forget to change the runtime check.