[asan] Switch to allocator2 on Android.

llvm-svn: 177263
This commit is contained in:
Evgeniy Stepanov 2013-03-18 09:22:58 +00:00
parent a1bdd2d942
commit 6488b2b257
2 changed files with 3 additions and 6 deletions

View File

@ -24,11 +24,7 @@
// will co-exist in the source base for a while. The actual allocator is chosen
// at build time by redefining this macro.
#ifndef ASAN_ALLOCATOR_VERSION
# if (ASAN_LINUX && !ASAN_ANDROID) || ASAN_MAC || ASAN_WINDOWS
# define ASAN_ALLOCATOR_VERSION 2
# else
# define ASAN_ALLOCATOR_VERSION 1
# endif
#define ASAN_ALLOCATOR_VERSION 2
#endif // ASAN_ALLOCATOR_VERSION
namespace __asan {

View File

@ -284,7 +284,8 @@ static void TestLargeMalloc(size_t size) {
}
TEST(AddressSanitizer, LargeMallocTest) {
for (int i = 113; i < (1 << 28); i = i * 2 + 13) {
const int max_size = (SANITIZER_WORDSIZE == 32) ? 1 << 26 : 1 << 28;
for (int i = 113; i < max_size; i = i * 2 + 13) {
TestLargeMalloc(i);
}
}