mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 06:06:19 +00:00
[libFuzzer] remove -iterations as redundant (there is also -num_runs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
13b1346197
commit
06465a68cc
@ -291,7 +291,7 @@ int FuzzerDriver(int argc, char **argv, UserSuppliedFuzzer &USF) {
|
||||
F.ShuffleAndMinimize();
|
||||
if (Flags.save_minimized_corpus)
|
||||
F.SaveCorpus();
|
||||
F.Loop(Flags.iterations < 0 ? INT_MAX : Flags.iterations);
|
||||
F.Loop();
|
||||
if (Flags.verbosity)
|
||||
Printf("Done %d runs in %zd second(s)\n", F.getTotalNumberOfRuns(),
|
||||
F.secondsSinceProcessStartUp());
|
||||
|
@ -12,9 +12,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
FUZZER_FLAG_INT(verbosity, 1, "Verbosity level.")
|
||||
FUZZER_FLAG_INT(seed, 0, "Random seed. If 0, seed is generated.")
|
||||
FUZZER_FLAG_INT(iterations, -1,
|
||||
"Number of iterations of the fuzzer internal loop"
|
||||
" (-1 for infinite iterations).")
|
||||
FUZZER_FLAG_INT(runs, -1,
|
||||
"Number of individual test runs (-1 for infinite runs).")
|
||||
FUZZER_FLAG_INT(max_len, 64, "Maximum length of the test input.")
|
||||
|
@ -94,7 +94,7 @@ class Fuzzer {
|
||||
};
|
||||
Fuzzer(UserSuppliedFuzzer &USF, FuzzingOptions Options);
|
||||
void AddToCorpus(const Unit &U) { Corpus.push_back(U); }
|
||||
void Loop(size_t NumIterations);
|
||||
void Loop();
|
||||
void ShuffleAndMinimize();
|
||||
void InitializeTraceState();
|
||||
size_t CorpusSize() const { return Corpus.size(); }
|
||||
|
@ -327,11 +327,11 @@ void Fuzzer::MutateAndTestOne(Unit *U) {
|
||||
}
|
||||
}
|
||||
|
||||
void Fuzzer::Loop(size_t NumIterations) {
|
||||
void Fuzzer::Loop() {
|
||||
for (auto &U: Options.Dictionary)
|
||||
USF.GetMD().AddWordToDictionary(U.data(), U.size());
|
||||
|
||||
for (size_t i = 1; i <= NumIterations; i++) {
|
||||
while (true) {
|
||||
for (size_t J1 = 0; J1 < Corpus.size(); J1++) {
|
||||
SyncCorpus();
|
||||
RereadOutputCorpus();
|
||||
|
Loading…
Reference in New Issue
Block a user