You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[sanitizer-common] Expand testing for 56-bit address spaces
This patch adds mmap_56bit_test.c, which attempts to deliberately
mmap above 2^47. This currently exposes a failure on ASan on
systems with 56-bit user address spaces, because it allows an mmap
above 2^47 but the shadow mapping is only set up for a 2^47 user address
space.
...
Differential Revision: https://reviews.llvm.org/D149176
Why it fails
ASan's dynamic shadow algorithm automatically figures out the address space size:
edit:
but the MaxVirtualAddress is hardcoded in compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Suggested fixes for ASan
(better) correctly figure out the max user virtual address (such as by deliberately trying to map above 47-bit). The dynamic shadow algorithm will then fix itself, and ASan should work with the full address space.
(worse) change the mmap interceptor to prevent it from mapping above 47-bit (i.e., pretend it is a 47-bit system).
Other sanitizers
Similar issues apply to most other sanitizers; those are harder to fix, because they mostly use handcrafted mappings rather than dynamic shadows.
The text was updated successfully, but these errors were encountered:
The failure mode for ASan is explained by the test added in llvm/llvm-project@6f66b12:
Why it fails
ASan's dynamic shadow algorithm automatically figures out the address space size:
edit:
but the MaxVirtualAddress is hardcoded in compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Suggested fixes for ASan
Other sanitizers
Similar issues apply to most other sanitizers; those are harder to fix, because they mostly use handcrafted mappings rather than dynamic shadows.
The text was updated successfully, but these errors were encountered: