From: Kostya Serebryany Date: Tue, 4 Nov 2014 19:46:15 +0000 (+0000) Subject: [asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5bd9810cc31d6a8145d95eb08b640fde09deb3a;p=platform%2Fupstream%2Fllvm.git [asan] [mips] changed ShadowOffset32 for systems having 16kb PageSize; patch by Kumar Sukhani llvm-svn: 221288 --- diff --git a/compiler-rt/lib/asan/asan_mapping.h b/compiler-rt/lib/asan/asan_mapping.h index 68428e1..c08af84 100644 --- a/compiler-rt/lib/asan/asan_mapping.h +++ b/compiler-rt/lib/asan/asan_mapping.h @@ -60,11 +60,11 @@ // || `[0x00000000, 0x1fffffff]` || LowMem || // // Default Linux/MIPS mapping: -// || `[0x2aaa8000, 0xffffffff]` || HighMem || -// || `[0x0fffd000, 0x2aaa7fff]` || HighShadow || -// || `[0x0bffd000, 0x0fffcfff]` || ShadowGap || -// || `[0x0aaa8000, 0x0bffcfff]` || LowShadow || -// || `[0x00000000, 0x0aaa7fff]` || LowMem || +// || `[0x2aaa0000, 0xffffffff]` || HighMem || +// || `[0x0fff4000, 0x2aa9ffff]` || HighShadow || +// || `[0x0bff4000, 0x0fff3fff]` || ShadowGap || +// || `[0x0aaa0000, 0x0bff3fff]` || LowShadow || +// || `[0x00000000, 0x0aa9ffff]` || LowMem || // // Shadow mapping on FreeBSD/x86-64 with SHADOW_OFFSET == 0x400000000000: // || `[0x500000000000, 0x7fffffffffff]` || HighMem || @@ -86,7 +86,7 @@ static const u64 kIosShadowOffset32 = 1ULL << 30; // 0x40000000 static const u64 kDefaultShadowOffset64 = 1ULL << 44; static const u64 kDefaultShort64bitShadowOffset = 0x7FFF8000; // < 2G. static const u64 kAArch64_ShadowOffset64 = 1ULL << 36; -static const u64 kMIPS32_ShadowOffset32 = 0x0aaa8000; +static const u64 kMIPS32_ShadowOffset32 = 0x0aaa0000; #if defined(__powerpc64__) && defined(__BIG_ENDIAN__) static const u64 kPPC64_ShadowOffset64 = 1ULL << 41; #elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index e93c011..2d5eb0a 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -60,7 +60,7 @@ static const uint64_t kIOSShadowOffset32 = 1ULL << 30; static const uint64_t kDefaultShadowOffset64 = 1ULL << 44; static const uint64_t kSmallX86_64ShadowOffset = 0x7FFF8000; // < 2G. static const uint64_t kPPC64_ShadowOffset64 = 1ULL << 41; -static const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa8000; +static const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000; static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30; static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46;