[PATCH] D69576: [sanitizer_common] Create max_allocation_size_mb flag.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 12:35:17 PDT 2019


eugenis added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_allocator.cpp:288
+                                       : kMaxAllowedMallocSize;
   }
 
----------------
why not in SharedInitCode ?
why not use Min(, kMaxAllowedMallocSize) same as you do in lsan and msan allocators?


================
Comment at: compiler-rt/lib/asan/asan_allocator.cpp:444
+    if (size > kMaxAllowedMallocSize || needed_size > kMaxAllowedMallocSize ||
+        size > max_user_defined_malloc_size) {
       if (AllocatorMayReturnNull()) {
----------------
Do we need this  check as well?
needed_size > max_user_defined_malloc_size


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69576/new/

https://reviews.llvm.org/D69576





More information about the llvm-commits mailing list