[PATCH] D39155: [libFuzzer] Periodically purge allocator's quarantine to prolong fuzzing sessions.
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 14:12:51 PDT 2017
alekseyshl added inline comments.
================
Comment at: lib/fuzzer/FuzzerLoop.cpp:604
+ !EF->__sanitizer_purge_allocator) {
+ return;
+ }
----------------
vitalybuka wrote:
> for could you put following together?
>
> ```
> EF->__sanitizer_purge_allocator();
> LastAllocatorPurgeAttemptTime = system_clock::now();
> ```
>
> e.g.
>
> ```
> void Fuzzer::PurgeAllocator() {
> if (some condition)
> return;
> if (some condition)
> return;
> if (some condition)
> return;
> if (some condition)
> return;
>
> EF->__sanitizer_purge_allocator();
> LastAllocatorPurgeAttemptTime = system_clock::now();
> }
>
> or
>
> void Fuzzer::PurgeAllocator() {
> if (some condition ||
> some condition ||
> some condition ||
> some condition) {
> return;
> }
>
> EF->__sanitizer_purge_allocator();
> LastAllocatorPurgeAttemptTime = system_clock::now();
> }
>
>
> ```
No, that's not what I wanted to achieve here, I want to record LastAllocatorPurgeAttemptTime regadless of the result of the last check, so that we do not call GetPeakRSSMb() too often.
https://reviews.llvm.org/D39155
More information about the llvm-commits
mailing list