Define NetBSD/amd64 ASAN Shadow Offset
Summary: Catch up after compiler-rt changes and define kNetBSD_ShadowOffset64 as (1ULL << 46). Sponsored by <The NetBSD Foundation> Reviewers: kcc, joerg, filcab, vitalybuka, eugenis Reviewed By: eugenis Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37234 llvm-svn: 311941
This commit is contained in:
@@ -83,6 +83,7 @@ static const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 37;
|
|||||||
static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36;
|
static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36;
|
||||||
static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30;
|
static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30;
|
||||||
static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46;
|
static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46;
|
||||||
|
static const uint64_t kNetBSD_ShadowOffset64 = 1ULL << 46;
|
||||||
static const uint64_t kPS4CPU_ShadowOffset64 = 1ULL << 40;
|
static const uint64_t kPS4CPU_ShadowOffset64 = 1ULL << 40;
|
||||||
static const uint64_t kWindowsShadowOffset32 = 3ULL << 28;
|
static const uint64_t kWindowsShadowOffset32 = 3ULL << 28;
|
||||||
// The shadow memory space is dynamically allocated.
|
// The shadow memory space is dynamically allocated.
|
||||||
@@ -402,6 +403,7 @@ static ShadowMapping getShadowMapping(Triple &TargetTriple, int LongSize,
|
|||||||
bool IsAndroid = TargetTriple.isAndroid();
|
bool IsAndroid = TargetTriple.isAndroid();
|
||||||
bool IsIOS = TargetTriple.isiOS() || TargetTriple.isWatchOS();
|
bool IsIOS = TargetTriple.isiOS() || TargetTriple.isWatchOS();
|
||||||
bool IsFreeBSD = TargetTriple.isOSFreeBSD();
|
bool IsFreeBSD = TargetTriple.isOSFreeBSD();
|
||||||
|
bool IsNetBSD = TargetTriple.isOSNetBSD();
|
||||||
bool IsPS4CPU = TargetTriple.isPS4CPU();
|
bool IsPS4CPU = TargetTriple.isPS4CPU();
|
||||||
bool IsLinux = TargetTriple.isOSLinux();
|
bool IsLinux = TargetTriple.isOSLinux();
|
||||||
bool IsPPC64 = TargetTriple.getArch() == llvm::Triple::ppc64 ||
|
bool IsPPC64 = TargetTriple.getArch() == llvm::Triple::ppc64 ||
|
||||||
@@ -446,6 +448,8 @@ static ShadowMapping getShadowMapping(Triple &TargetTriple, int LongSize,
|
|||||||
Mapping.Offset = kSystemZ_ShadowOffset64;
|
Mapping.Offset = kSystemZ_ShadowOffset64;
|
||||||
else if (IsFreeBSD)
|
else if (IsFreeBSD)
|
||||||
Mapping.Offset = kFreeBSD_ShadowOffset64;
|
Mapping.Offset = kFreeBSD_ShadowOffset64;
|
||||||
|
else if (IsNetBSD)
|
||||||
|
Mapping.Offset = kNetBSD_ShadowOffset64;
|
||||||
else if (IsPS4CPU)
|
else if (IsPS4CPU)
|
||||||
Mapping.Offset = kPS4CPU_ShadowOffset64;
|
Mapping.Offset = kPS4CPU_ShadowOffset64;
|
||||||
else if (IsLinux && IsX86_64) {
|
else if (IsLinux && IsX86_64) {
|
||||||
|
|||||||
Reference in New Issue
Block a user