diff options
-rw-r--r-- | compiler-rt/lib/asan/asan_mapping.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/compiler-rt/lib/asan/asan_mapping.h b/compiler-rt/lib/asan/asan_mapping.h index 3912484c8b3..22ee81fb5c4 100644 --- a/compiler-rt/lib/asan/asan_mapping.h +++ b/compiler-rt/lib/asan/asan_mapping.h @@ -22,15 +22,20 @@ #if ASAN_FLEXIBLE_MAPPING_AND_OFFSET == 1 extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_scale; extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_offset; -#define SHADOW_SCALE (__asan_mapping_scale) -#define SHADOW_OFFSET (__asan_mapping_offset) +# define SHADOW_SCALE (__asan_mapping_scale) +# define SHADOW_OFFSET (__asan_mapping_offset) #else -#define SHADOW_SCALE (3) -#if __WORDSIZE == 32 -#define SHADOW_OFFSET (1 << 29) -#else -#define SHADOW_OFFSET (1ULL << 44) -#endif +# ifdef ANDROID +# define SHADOW_SCALE (3) +# define SHADOW_OFFSET (0) +# else +# define SHADOW_SCALE (3) +# if __WORDSIZE == 32 +# define SHADOW_OFFSET (1 << 29) +# else +# define SHADOW_OFFSET (1ULL << 44) +# endif +# endif #endif // ASAN_FLEXIBLE_MAPPING_AND_OFFSET #define SHADOW_GRANULARITY (1ULL << SHADOW_SCALE) |