summaryrefslogtreecommitdiff
path: root/lib/fuzzer/FuzzerDriver.cpp
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-10-23 22:04:30 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-10-23 22:04:30 +0000
commit4b9f44eeb084b0aa8ed0e8ddc5da8a3f13e5a764 (patch)
tree901ea456f08d41ae5cf5a6836834d2410dd1deae /lib/fuzzer/FuzzerDriver.cpp
parentd93cb79ee54b601d00a1852e78895ae236857262 (diff)
downloadcompiler-rt-4b9f44eeb084b0aa8ed0e8ddc5da8a3f13e5a764.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerDriver.cpp')
-rw-r--r--lib/fuzzer/FuzzerDriver.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/fuzzer/FuzzerDriver.cpp b/lib/fuzzer/FuzzerDriver.cpp
index 29248dcee..18c73ca75 100644
--- a/lib/fuzzer/FuzzerDriver.cpp
+++ b/lib/fuzzer/FuzzerDriver.cpp
@@ -578,6 +578,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
Options.ReloadIntervalSec = Flags.reload;
Options.OnlyASCII = Flags.only_ascii;
Options.DetectLeaks = Flags.detect_leaks;
+ Options.PurgeAllocatorIntervalSec = Flags.purge_allocator_interval;
Options.TraceMalloc = Flags.trace_malloc;
Options.RssLimitMb = Flags.rss_limit_mb;
if (Flags.runs >= 0)