[libFuzzer] Periodically purge allocator's quarantine to prolong fuzzing sessions.
authorAlex Shlyapnikov <alekseys@google.com>
Mon, 23 Oct 2017 22:04:30 +0000 (22:04 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Mon, 23 Oct 2017 22:04:30 +0000 (22:04 +0000)
commit6f1c26f222b5df888a42ac53f1b600f2bd511c1b
treecc314d8e1a5620e66d803ffcb18aa7cb464057dc
parent30680e943735ae8f008af0513e85725f3d6cfee6
[libFuzzer] Periodically purge allocator's quarantine to prolong fuzzing sessions.

Summary:
Fuzzing targets that allocate/deallocate a lot of memory tend to consume
a lot of RSS when ASan quarantine is enabled. Purging quarantine between
iterations and returning memory to OS keeps RSS down and should not
reduce the quarantine effectiveness provided the fuzz target does not
preserve state between iterations (in this case this feature can be turned off).

Based on D39153.

Reviewers: vitalybuka

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39155

llvm-svn: 316382
compiler-rt/lib/fuzzer/FuzzerDriver.cpp
compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
compiler-rt/lib/fuzzer/FuzzerFlags.def
compiler-rt/lib/fuzzer/FuzzerInternal.h
compiler-rt/lib/fuzzer/FuzzerLoop.cpp
compiler-rt/lib/fuzzer/FuzzerOptions.h