[compiler-rt] r239187 - [ASan] Bump maximum allowed malloc() size in ASan allocator to 1Tb.

Alexey Samsonov vonosmas at gmail.com
Fri Jun 5 13:50:03 PDT 2015


Author: samsonov
Date: Fri Jun  5 15:50:02 2015
New Revision: 239187

URL: http://llvm.org/viewvc/llvm-project?rev=239187&view=rev
Log:
[ASan] Bump maximum allowed malloc() size in ASan allocator to 1Tb.

1Tb of RAM ought to be enough for anybody.

Modified:
    compiler-rt/trunk/lib/asan/asan_allocator.cc

Modified: compiler-rt/trunk/lib/asan/asan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.cc?rev=239187&r1=239186&r2=239187&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.cc Fri Jun  5 15:50:02 2015
@@ -223,7 +223,7 @@ void AllocatorOptions::CopyTo(Flags *f,
 
 struct Allocator {
   static const uptr kMaxAllowedMallocSize =
-      FIRST_32_SECOND_64(3UL << 30, 64UL << 30);
+      FIRST_32_SECOND_64(3UL << 30, 1UL << 40);
   static const uptr kMaxThreadLocalQuarantine =
       FIRST_32_SECOND_64(1 << 18, 1 << 20);
 
@@ -354,7 +354,7 @@ struct Allocator {
     }
     CHECK(IsAligned(needed_size, min_alignment));
     if (size > kMaxAllowedMallocSize || needed_size > kMaxAllowedMallocSize) {
-      Report("WARNING: AddressSanitizer failed to allocate %p bytes\n",
+      Report("WARNING: AddressSanitizer failed to allocate 0x%zx bytes\n",
              (void*)size);
       return allocator.ReturnNullOrDie();
     }





More information about the llvm-commits mailing list