From e039aacf55a27bce76e7e6f695fefa8d1757371d Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 7 Aug 2015 22:38:44 +0000 Subject: [asan] Try different values of the shadow gap start. The number of unaccessible pages at the beginning of the address space can differ between processes on the same machine. Try different values at runtime to protect as much memory as possible. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244364 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/asan/asan_mapping.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/asan/asan_mapping.h') diff --git a/lib/asan/asan_mapping.h b/lib/asan/asan_mapping.h index 8b4857e6d..937c57b28 100644 --- a/lib/asan/asan_mapping.h +++ b/lib/asan/asan_mapping.h @@ -178,7 +178,8 @@ static const u64 kWindowsShadowOffset32 = 3ULL << 28; // 0x30000000 // With the zero shadow base we can not actually map pages starting from 0. // This constant is somewhat arbitrary. -#define kZeroBaseShadowStart 4096 +#define kZeroBaseShadowStart 0 +#define kZeroBaseMaxShadowStart (1 << 18) #define kShadowGapBeg (kLowShadowEnd ? kLowShadowEnd + 1 \ : kZeroBaseShadowStart) -- cgit v1.2.3