[compiler-rt] [hwasan] Add fixed_shadow_base flag (PR #73980)
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 14:27:15 PST 2023
================
@@ -106,8 +106,14 @@ static uptr GetHighMemEnd() {
}
static void InitializeShadowBaseAddress(uptr shadow_size_bytes) {
- __hwasan_shadow_memory_dynamic_address =
- FindDynamicShadowStart(shadow_size_bytes);
+ // NULL is generally address zero, so it is not a valid location for the
+ // shadow.
+ if (flags()->fixed_shadow_base != 0) {
+ __hwasan_shadow_memory_dynamic_address = flags()->fixed_shadow_base;
----------------
thurstond wrote:
Added compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c
https://github.com/llvm/llvm-project/pull/73980
More information about the llvm-commits
mailing list