diff options
| author | Kostya Serebryany <kcc@google.com> | 2013-02-28 12:28:37 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2013-02-28 12:28:37 +0000 |
| commit | abebb5727216bcf09bc616ac780a20b33f5b18fd (patch) | |
| tree | d40ef0f8738694e0073a324dc812fb70a36e65a5 /compiler-rt/lib/asan | |
| parent | 4a3234bec5d44a8e4e6af37dfae684be3df30997 (diff) | |
| download | bcm5719-llvm-abebb5727216bcf09bc616ac780a20b33f5b18fd.tar.gz bcm5719-llvm-abebb5727216bcf09bc616ac780a20b33f5b18fd.zip | |
[asan] bump kMidMemEnd to 0x4fffffffffULL since in rare cases prelink uses addresses higher than 0x3fffffffff
llvm-svn: 176250
Diffstat (limited to 'compiler-rt/lib/asan')
| -rw-r--r-- | compiler-rt/lib/asan/asan_mapping.h | 12 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/asan_rtl.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/lit_tests/Linux/asan_prelink_test.cc | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/compiler-rt/lib/asan/asan_mapping.h b/compiler-rt/lib/asan/asan_mapping.h index feaf3533851..161ab6535de 100644 --- a/compiler-rt/lib/asan/asan_mapping.h +++ b/compiler-rt/lib/asan/asan_mapping.h @@ -32,13 +32,13 @@ // || `[0x000000040000, 0x01ffffffffff]` || ShadowGap || // // Special case when something is already mapped between -// 0x003000000000 and 0x004000000000 (e.g. when prelink is installed): +// 0x003000000000 and 0x005000000000 (e.g. when prelink is installed): // || `[0x10007fff8000, 0x7fffffffffff]` || HighMem || // || `[0x02008fff7000, 0x10007fff7fff]` || HighShadow || -// || `[0x004000000000, 0x02008fff6fff]` || ShadowGap3 || -// || `[0x003000000000, 0x003fffffffff]` || MidMem || -// || `[0x00087fff8000, 0x002fffffffff]` || ShadowGap2 || -// || `[0x00067fff8000, 0x00087fff7fff]` || MidShadow || +// || `[0x005000000000, 0x02008fff6fff]` || ShadowGap3 || +// || `[0x003000000000, 0x004fffffffff]` || MidMem || +// || `[0x000a7fff8000, 0x002fffffffff]` || ShadowGap2 || +// || `[0x00067fff8000, 0x000a7fff7fff]` || MidShadow || // || `[0x00008fff7000, 0x00067fff7fff]` || ShadowGap || // || `[0x00007fff8000, 0x00008fff6fff]` || LowShadow || // || `[0x000000000000, 0x00007fff7fff]` || LowMem || @@ -131,7 +131,7 @@ extern uptr AsanMappingProfile[]; // difference between fixed and non-fixed mapping is below the noise level. static uptr kHighMemEnd = 0x7fffffffffffULL; static uptr kMidMemBeg = 0x3000000000ULL; -static uptr kMidMemEnd = 0x3fffffffffULL; +static uptr kMidMemEnd = 0x4fffffffffULL; #else SANITIZER_INTERFACE_ATTRIBUTE extern uptr kHighMemEnd, kMidMemBeg, kMidMemEnd; // Initialized in __asan_init. diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index 7985903bf56..770e93a5843 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -459,7 +459,7 @@ void __asan_init() { #if ASAN_LINUX && defined(__x86_64__) && !ASAN_FIXED_MAPPING if (!full_shadow_is_available) { kMidMemBeg = kLowMemEnd < 0x3000000000ULL ? 0x3000000000ULL : 0; - kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x3fffffffffULL : 0; + kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x4fffffffffULL : 0; } #endif diff --git a/compiler-rt/lib/asan/lit_tests/Linux/asan_prelink_test.cc b/compiler-rt/lib/asan/lit_tests/Linux/asan_prelink_test.cc index 114ffa51e17..522c1917139 100644 --- a/compiler-rt/lib/asan/lit_tests/Linux/asan_prelink_test.cc +++ b/compiler-rt/lib/asan/lit_tests/Linux/asan_prelink_test.cc @@ -22,5 +22,5 @@ int main(int argc, char **argv) { *getG() = 0; } #endif -// CHECK: 0x003000000000, 0x003fffffffff{{.*}} MidMem +// CHECK: 0x003000000000, 0x004fffffffff{{.*}} MidMem // CHECK: SO mapped at 3600000000 |

