[compiler-rt] r176340 - [asan] Revert r176255, r176264.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Mar 1 01:33:06 PST 2013


Author: eugenis
Date: Fri Mar  1 03:33:05 2013
New Revision: 176340

URL: http://llvm.org/viewvc/llvm-project?rev=176340&view=rev
Log:
[asan] Revert r176255, r176264.

New allocator has 1.5x memory overhead of the old one.

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=176340&r1=176339&r2=176340&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.h (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.h Fri Mar  1 03:33:05 2013
@@ -24,7 +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_MAC || ASAN_WINDOWS
+# if (ASAN_LINUX && !ASAN_ANDROID) || ASAN_MAC || ASAN_WINDOWS
 #  define ASAN_ALLOCATOR_VERSION 2
 # else
 #  define ASAN_ALLOCATOR_VERSION 1

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=176340&r1=176339&r2=176340&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Fri Mar  1 03:33:05 2013
@@ -319,8 +319,7 @@ static void TestLargeMalloc(size_t size)
 }
 
 TEST(AddressSanitizer, LargeMallocTest) {
-  const int max_size = (ASAN_LOW_MEMORY) ? 1 << 26 : 1 << 28;
-  for (int i = 113; i < max_size; i = i * 2 + 13) {
+  for (int i = 113; i < (1 << 28); i = i * 2 + 13) {
     TestLargeMalloc(i);
   }
 }





More information about the llvm-commits mailing list