diff options
| author | Timur Iskhodzhanov <timurrrr@google.com> | 2015-01-22 12:24:21 +0000 |
|---|---|---|
| committer | Timur Iskhodzhanov <timurrrr@google.com> | 2015-01-22 12:24:21 +0000 |
| commit | b4b6b74079c49df2b764d4081b5571336593ba2e (patch) | |
| tree | ce10fedd0653f2ea6417eb0c4227e57b70b6f296 | |
| parent | 150d9f3187252d6ca872456684ace1f958440ce1 (diff) | |
| download | bcm5719-llvm-b4b6b74079c49df2b764d4081b5571336593ba2e.tar.gz bcm5719-llvm-b4b6b74079c49df2b764d4081b5571336593ba2e.zip | |
[ASan/Win] Move the shadow to 0x30000000
llvm-svn: 226809
| -rw-r--r-- | compiler-rt/lib/asan/asan_mapping.h | 14 | ||||
| -rw-r--r-- | compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/compiler-rt/lib/asan/asan_mapping.h b/compiler-rt/lib/asan/asan_mapping.h index 94a1f834a09..8008474a7c2 100644 --- a/compiler-rt/lib/asan/asan_mapping.h +++ b/compiler-rt/lib/asan/asan_mapping.h @@ -81,11 +81,13 @@ // || `[0x00000000, 0x3fffffff]` || LowMem || // // Default Windows/i386 mapping: -// || `[0x60000000, 0xffffffff]` || HighMem || -// || `[0x4c000000, 0x5fffffff]` || HighShadow || -// || `[0x48000000, 0x4bffffff]` || ShadowGap || -// || `[0x40000000, 0x47ffffff]` || LowShadow || -// || `[0x00000000, 0x3fffffff]` || LowMem || +// (the exact location of HighShadow/HighMem may vary depending +// on WoW64, /LARGEADDRESSAWARE, etc). +// || `[0x50000000, 0xffffffff]` || HighMem || +// || `[0x3a000000, 0x4fffffff]` || HighShadow || +// || `[0x36000000, 0x39ffffff]` || ShadowGap || +// || `[0x30000000, 0x35ffffff]` || LowShadow || +// || `[0x00000000, 0x2fffffff]` || LowMem || static const u64 kDefaultShadowScale = 3; static const u64 kDefaultShadowOffset32 = 1ULL << 29; // 0x20000000 @@ -98,7 +100,7 @@ static const u64 kMIPS64_ShadowOffset64 = 1ULL << 36; static const u64 kPPC64_ShadowOffset64 = 1ULL << 41; static const u64 kFreeBSD_ShadowOffset32 = 1ULL << 30; // 0x40000000 static const u64 kFreeBSD_ShadowOffset64 = 1ULL << 46; // 0x400000000000 -static const u64 kWindowsShadowOffset32 = 1ULL << 30; // 0x40000000 +static const u64 kWindowsShadowOffset32 = 3ULL << 28; // 0x30000000 #define SHADOW_SCALE kDefaultShadowScale #if SANITIZER_ANDROID diff --git a/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc b/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc index 385db20f98d..97cd3d60cdf 100644 --- a/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc +++ b/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cc @@ -10,7 +10,7 @@ int main() { scanf("%s", bigchunk); // CHECK-NOT: Hello, world! // CHECK: Shadow memory range interleaves with an existing memory mapping. -// CHECK: ASan shadow was supposed to be located in the [0x3fff0000-0x{{.*}}ffff] range. +// CHECK: ASan shadow was supposed to be located in the [0x2fff0000-0x{{.*}}ffff] range. // CHECK: Dumping process modules: // CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}shadow_mapping_failure // CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}kernel32.dll diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 745c85a98e2..25f1f022c40 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -67,7 +67,7 @@ static const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000; static const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 36; static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30; static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46; -static const uint64_t kWindowsShadowOffset32 = 1ULL << 30; +static const uint64_t kWindowsShadowOffset32 = 3ULL << 28; static const size_t kMinStackMallocSize = 1 << 6; // 64B static const size_t kMaxStackMallocSize = 1 << 16; // 64K |

