[PATCH] D125873: [asan] Add the FreeBSD AArch64 shadow offset to llvm
Andrew Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 04:00:42 PDT 2022
andrew created this revision.
Herald added subscribers: pengfei, hiraditya, kristof.beyls, krytarowski, arichardson, emaste.
Herald added a project: All.
andrew requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
AArch64 has a larger address space than 64 but x86. Use the larger
shadow offset on FreeBSD AArch64.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125873
Files:
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Index: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -106,6 +106,7 @@
static const uint64_t kRISCV64_ShadowOffset64 = 0xd55550000;
static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30;
static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46;
+static const uint64_t kFreeBSDAArch64_ShadowOffset64 = 1ULL << 47;
static const uint64_t kFreeBSDKasan_ShadowOffset64 = 0xdffff7c000000000;
static const uint64_t kNetBSD_ShadowOffset32 = 1ULL << 30;
static const uint64_t kNetBSD_ShadowOffset64 = 1ULL << 46;
@@ -518,6 +519,8 @@
Mapping.Offset = kPPC64_ShadowOffset64;
else if (IsSystemZ)
Mapping.Offset = kSystemZ_ShadowOffset64;
+ else if (IsFreeBSD && IsAArch64)
+ Mapping.Offset = kFreeBSDAArch64_ShadowOffset64;
else if (IsFreeBSD && !IsMIPS64) {
if (IsKasan)
Mapping.Offset = kFreeBSDKasan_ShadowOffset64;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125873.430317.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220518/d0c19232/attachment.bin>
More information about the llvm-commits
mailing list