[sanitizer_common] Create max_allocation_size_mb flag.
authorMatt Morehouse <mascasa@google.com>
Wed, 30 Oct 2019 18:17:56 +0000 (11:17 -0700)
committerMatt Morehouse <mascasa@google.com>
Wed, 30 Oct 2019 18:26:05 +0000 (11:26 -0700)
commit7904bd9409b86afbec763d0d95cb75ccef559379
tree2b804ca111107a4749af4213426e5bee6fac4d5e
parente477988309dbde214a6d16ec690a416882714aac
[sanitizer_common] Create max_allocation_size_mb flag.

Summary:
The flag allows the user to specify a maximum allocation size that the
sanitizers will honor.  Any larger allocations will return nullptr or
crash depending on allocator_may_return_null.

Reviewers: kcc, eugenis

Reviewed By: kcc, eugenis

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D69576
compiler-rt/lib/asan/asan_allocator.cpp
compiler-rt/lib/lsan/lsan_allocator.cpp
compiler-rt/lib/msan/msan_allocator.cpp
compiler-rt/lib/sanitizer_common/sanitizer_flags.inc
compiler-rt/lib/tsan/rtl/tsan_mman.cpp
compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp [new file with mode: 0644]