[asan] Use dynamic shadow memory position on Apple Silicon macOS
authorKuba Mracek <mracek@apple.com>
Sat, 18 Jul 2020 00:39:43 +0000 (17:39 -0700)
committerKuba Mracek <mracek@apple.com>
Sat, 18 Jul 2020 00:40:21 +0000 (17:40 -0700)
commit176a6e7abe33d58a65ce9cfac15fe320962e7b6e
tree7f17ca1ec7e9ddaeb2aab62643637c178725dcf6
parent105056045d9ab0b1a49781a18129ada48893452e
[asan] Use dynamic shadow memory position on Apple Silicon macOS

This is needed because macOS on Apple Silicon has some reserved pages inside the "regular" shadow memory location, and mapping over that location fails.

Differential Revision: https://reviews.llvm.org/D82912
compiler-rt/lib/asan/asan_mapping.h
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/dynamic-shadow-darwin.ll