From: Etienne Bergeron Date: Tue, 21 Jun 2016 15:07:29 +0000 (+0000) Subject: This is part of the effort for asan to support Windows 64 bit. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4f51c3ea5617bec17ac927eb12e00cd21891f51;p=llvm This is part of the effort for asan to support Windows 64 bit. The large offset is being tested on Windows 10 (which has larger usable virtual address space than Windows 8 or earlier) Patch by: Wei Wang Differential Revision: http://reviews.llvm.org/D21523 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273269 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 599b2cc5b36..79a36b313b4 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -78,6 +78,8 @@ static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36; static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30; static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46; static const uint64_t kWindowsShadowOffset32 = 3ULL << 28; +// TODO(wwchrome): Experimental for asan Win64, may change. +static const uint64_t kWindowsShadowOffset64 = 0x1ULL << 45; // 32TB. static const size_t kMinStackMallocSize = 1 << 6; // 64B static const size_t kMaxStackMallocSize = 1 << 16; // 64K @@ -396,6 +398,8 @@ static ShadowMapping getShadowMapping(Triple &TargetTriple, int LongSize, Mapping.Offset = kLinuxKasan_ShadowOffset64; else Mapping.Offset = kSmallX86_64ShadowOffset; + } else if (IsWindows && IsX86_64) { + Mapping.Offset = kWindowsShadowOffset64; } else if (IsMIPS64) Mapping.Offset = kMIPS64_ShadowOffset64; else if (IsIOS)