[compiler-rt] Add the FreeBSD AArch64 shadow offset
authorAndrew Turner <andrew@fubar.geek.nz>
Mon, 16 May 2022 16:07:52 +0000 (17:07 +0100)
committerEd Maste <emaste@FreeBSD.org>
Wed, 8 Jun 2022 21:22:16 +0000 (17:22 -0400)
As with 64 bit x86 use an offset in middle of the address space scaled up
to work with the full 48 bit space.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D125757

compiler-rt/lib/asan/asan_mapping.h

index e448d97..cc5f583 100644 (file)
 #    define ASAN_SHADOW_OFFSET_DYNAMIC
 #  elif SANITIZER_APPLE && defined(__aarch64__)
 #    define ASAN_SHADOW_OFFSET_DYNAMIC
+#  elif SANITIZER_FREEBSD && defined(__aarch64__)
+#    define ASAN_SHADOW_OFFSET_CONST 0x0000800000000000
 #  elif SANITIZER_RISCV64
 #    define ASAN_SHADOW_OFFSET_CONST 0x0000000d55550000
 #  elif defined(__aarch64__)