]> granicus.if.org Git - llvm/commitdiff
[libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually)
authorKostya Serebryany <kcc@google.com>
Wed, 19 Jul 2017 22:10:30 +0000 (22:10 +0000)
committerKostya Serebryany <kcc@google.com>
Wed, 19 Jul 2017 22:10:30 +0000 (22:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308541 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LibFuzzer.rst
lib/Fuzzer/FuzzerFlags.def
lib/Fuzzer/test/shrink.test
lib/Fuzzer/test/value-profile-load.test

index 0f0b0e2e6fbd2915d96b868f8052822f86c37478..b833c2a6cb918e5f5a8a0912e0268cf392eee29a 100644 (file)
@@ -345,6 +345,9 @@ possible event codes are:
 ``NEW``
   The fuzzer has created a test input that covers new areas of the code
   under test.  This input will be saved to the primary corpus directory.
+``REDUCE``
+  The fuzzer has found a better (smaller) input that triggers previously
+  discovered features (set ``-reduce_inputs=0`` to disable).
 ``pulse``
   The fuzzer has generated 2\ :sup:`n` inputs (generated periodically to reassure
   the user that the fuzzer is still working).
index 526805705b201a29ce4cb6c6d456f01c9034d2bc..2887fd24d480c0cd66f82122fa759df8375dd797 100644 (file)
@@ -66,8 +66,8 @@ FUZZER_FLAG_INT(use_value_profile, 0,
                 "Experimental. Use value profile to guide fuzzing.")
 FUZZER_FLAG_INT(use_cmp, 1, "Use CMP traces to guide mutations")
 FUZZER_FLAG_INT(shrink, 0, "Experimental. Try to shrink corpus inputs.")
-FUZZER_FLAG_INT(reduce_inputs, 0, "Experimental. "
-  "Try to reduce the size of inputs wile preserving their full feature sets")
+FUZZER_FLAG_INT(reduce_inputs, 1,
+  "Try to reduce the size of inputs while preserving their full feature sets")
 FUZZER_FLAG_UNSIGNED(jobs, 0, "Number of jobs to run. If jobs >= 1 we spawn"
                           " this number of jobs in separate worker processes"
                           " with stdout/stderr redirected to fuzz-JOB.log.")
index edb86cb1938502152ac8c0efb8fa84017cf174e2..79355a8f71a5b0f6c1f03e0130992fdba11a98a1 100644 (file)
@@ -1,6 +1,6 @@
-RUN: LLVMFuzzer-ShrinkControlFlowTest -seed=1 -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000  -shrink=1 2>&1 | FileCheck %s --check-prefix=SHRINK1
-RUN: LLVMFuzzer-ShrinkControlFlowTest -seed=1 -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000 -shrink=0 2>&1 | FileCheck %s --check-prefix=SHRINK0
-RUN: LLVMFuzzer-ShrinkValueProfileTest -seed=1 -exit_on_item=aea2e3923af219a8956f626558ef32f30a914ebc -runs=100000 -shrink=1 -use_value_profile=1 2>&1 | FileCheck %s --check-prefix=SHRINK1_VP
+RUN: LLVMFuzzer-ShrinkControlFlowTest -seed=1 -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000  -shrink=1 -reduce_inputs=0 2>&1 | FileCheck %s --check-prefix=SHRINK1
+RUN: LLVMFuzzer-ShrinkControlFlowTest -seed=1 -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000 -shrink=0 -reduce_inputs=0 2>&1 | FileCheck %s --check-prefix=SHRINK0
+RUN: LLVMFuzzer-ShrinkValueProfileTest -seed=1 -exit_on_item=aea2e3923af219a8956f626558ef32f30a914ebc -runs=100000 -shrink=1 -reduce_inputs=0 -use_value_profile=1 2>&1 | FileCheck %s --check-prefix=SHRINK1_VP
 
 SHRINK0: Done 1000000 runs in
 SHRINK1: INFO: found item with checksum '0eb8e4ed029b774d80f2b66408203801cb982a60', exiting.
index 14d3109a24e195803d0268ac42ca447db6a5b6bf..f4a5fd5a68ead47329f0cedadefcb975111efdf2 100644 (file)
@@ -1,3 +1,3 @@
 CHECK: AddressSanitizer: global-buffer-overflow
-RUN: not LLVMFuzzer-LoadTest -seed=1 -use_cmp=0 -use_value_profile=1 -runs=10000000 2>&1 | FileCheck %s
+RUN: not LLVMFuzzer-LoadTest -seed=2 -use_cmp=0 -use_value_profile=1 -runs=20000000 2>&1 | FileCheck %s