Use zero-based shadow by default on Android.
llvm-svn: 157318
This commit is contained in:
parent
617232f32b
commit
8f247016bd
|
@ -22,15 +22,20 @@
|
||||||
#if ASAN_FLEXIBLE_MAPPING_AND_OFFSET == 1
|
#if ASAN_FLEXIBLE_MAPPING_AND_OFFSET == 1
|
||||||
extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_scale;
|
extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_scale;
|
||||||
extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_offset;
|
extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_offset;
|
||||||
#define SHADOW_SCALE (__asan_mapping_scale)
|
# define SHADOW_SCALE (__asan_mapping_scale)
|
||||||
#define SHADOW_OFFSET (__asan_mapping_offset)
|
# define SHADOW_OFFSET (__asan_mapping_offset)
|
||||||
#else
|
#else
|
||||||
#define SHADOW_SCALE (3)
|
# ifdef ANDROID
|
||||||
#if __WORDSIZE == 32
|
# define SHADOW_SCALE (3)
|
||||||
#define SHADOW_OFFSET (1 << 29)
|
# define SHADOW_OFFSET (0)
|
||||||
#else
|
# else
|
||||||
#define SHADOW_OFFSET (1ULL << 44)
|
# define SHADOW_SCALE (3)
|
||||||
#endif
|
# if __WORDSIZE == 32
|
||||||
|
# define SHADOW_OFFSET (1 << 29)
|
||||||
|
# else
|
||||||
|
# define SHADOW_OFFSET (1ULL << 44)
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
#endif // ASAN_FLEXIBLE_MAPPING_AND_OFFSET
|
#endif // ASAN_FLEXIBLE_MAPPING_AND_OFFSET
|
||||||
|
|
||||||
#define SHADOW_GRANULARITY (1ULL << SHADOW_SCALE)
|
#define SHADOW_GRANULARITY (1ULL << SHADOW_SCALE)
|
||||||
|
|
Loading…
Reference in New Issue