[compiler-rt] r177263 - [asan] Switch to allocator2 on Android.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Mar 18 02:22:58 PDT 2013
Author: eugenis
Date: Mon Mar 18 04:22:58 2013
New Revision: 177263
URL: http://llvm.org/viewvc/llvm-project?rev=177263&view=rev
Log:
[asan] Switch to allocator2 on Android.
Modified:
compiler-rt/trunk/lib/asan/asan_allocator.h
compiler-rt/trunk/lib/asan/tests/asan_test.cc
Modified: compiler-rt/trunk/lib/asan/asan_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.h?rev=177263&r1=177262&r2=177263&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.h (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.h Mon Mar 18 04:22:58 2013
@@ -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 {
Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=177263&r1=177262&r2=177263&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Mon Mar 18 04:22:58 2013
@@ -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);
}
}
More information about the llvm-commits
mailing list