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
[msan] Add 'MappingDesc::ALLOCATOR' type and check it is available
MSan divides the virtual address space into APP, INVALID, SHADOW and
ORIGIN memory. The allocator usually just steals a bit of the APP
address space: typically the bottom portion of the PIE binaries
section, which works because the Linux kernel maps from the top of
the PIE binaries section. However, if ASLR is very aggressive, the
binary may end up mapped in the same location where the allocator
wants to live; this results in a segfault.
This patch adds in a MappingDesc::ALLOCATOR type and enforces that
the memory range for the allocator is not occupied by anything else.
Since the allocator range information is not readily available in msan.h,
we duplicate the information from msan_allocator.cpp.
Note: aggressive ASLR can also lead to a different type of failure, where
the PIE binaries/libaries are mapped entirely outside of the APP/ALLOCATOR
sections; that will be addressed in a separate patch (llvm#85142).
0 commit comments