[llvm] r256086 - [libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 19:42:17 PST 2015
Author: kcc
Date: Fri Dec 18 21:42:16 2015
New Revision: 256086
URL: http://llvm.org/viewvc/llvm-project?rev=256086&view=rev
Log:
[libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
Modified:
llvm/trunk/docs/LibFuzzer.rst
llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
llvm/trunk/lib/Fuzzer/FuzzerFlags.def
Modified: llvm/trunk/docs/LibFuzzer.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LibFuzzer.rst?rev=256086&r1=256085&r2=256086&view=diff
==============================================================================
--- llvm/trunk/docs/LibFuzzer.rst (original)
+++ llvm/trunk/docs/LibFuzzer.rst Fri Dec 18 21:42:16 2015
@@ -63,7 +63,6 @@ The most important flags are::
timeout 1200 Timeout in seconds (if positive). If one unit runs more than this number of seconds the process will abort.
max_total_time 0 If positive, indicates the maximal total time in seconds to run the fuzzer.
help 0 Print help.
- save_minimized_corpus 0 If 1, the minimized corpus is saved into the first input directory. Example: ./fuzzer -save_minimized_corpus=1 NEW_EMPTY_DIR OLD_CORPUS
merge 0 If 1, the 2-nd, 3-rd, etc corpora will be merged into the 1-st corpus. Only interesting units will be taken.
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.
workers 0 Number of simultaneous worker processes to run the jobs. If zero, "min(jobs,NumberOfCpuCores()/2)" is used.
Modified: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp?rev=256086&r1=256085&r2=256086&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp Fri Dec 18 21:42:16 2015
@@ -296,6 +296,11 @@ int FuzzerDriver(const std::vector<std::
exit(0);
}
+ if (Flags.save_minimized_corpus) {
+ Printf("The flag -save_minimized_corpus is deprecated; use -merge=1\n");
+ exit(1);
+ }
+
if (Flags.merge) {
F.Merge(*Inputs);
exit(0);
@@ -317,9 +322,7 @@ int FuzzerDriver(const std::vector<std::
if (F.CorpusSize() == 0)
F.AddToCorpus(Unit()); // Can't fuzz empty corpus, so add an empty input.
F.ShuffleAndMinimize();
- if (Flags.save_minimized_corpus)
- F.SaveCorpus();
- else if (Flags.drill)
+ if (Flags.drill)
F.Drill();
else
F.Loop();
Modified: llvm/trunk/lib/Fuzzer/FuzzerFlags.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerFlags.def?rev=256086&r1=256085&r2=256086&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerFlags.def (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerFlags.def Fri Dec 18 21:42:16 2015
@@ -32,10 +32,7 @@ FUZZER_FLAG_INT(
FUZZER_FLAG_INT(max_total_time, 0, "If positive, indicates the maximal total "
"time in seconds to run the fuzzer.")
FUZZER_FLAG_INT(help, 0, "Print help.")
-FUZZER_FLAG_INT(
- save_minimized_corpus, 0,
- "If 1, the minimized corpus is saved into the first input directory. "
- "Example: ./fuzzer -save_minimized_corpus=1 NEW_EMPTY_DIR OLD_CORPUS")
+FUZZER_FLAG_INT(save_minimized_corpus, 0, "Deprecated. Use -merge=1")
FUZZER_FLAG_INT(merge, 0, "If 1, the 2-nd, 3-rd, etc corpora will be "
"merged into the 1-st corpus. Only interesting units will be taken.")
FUZZER_FLAG_INT(use_counters, 1, "Use coverage counters")
More information about the llvm-commits
mailing list