llvm.org GIT mirror llvm / 37e715d
[libFuzzer] warn if the corpus is empty git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266670 91177308-0d34-0410-b5e6-96231b3b80d8 Kostya Serebryany 4 years ago
2 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
375375 F.SetMaxLen(
376376 std::min(std::max(kMinDefaultLen, F.MaxUnitSizeInCorpus()), kMaxSaneLen));
377377
378 if (F.CorpusSize() == 0)
378 if (F.CorpusSize() == 0) {
379379 F.AddToCorpus(Unit()); // Can't fuzz empty corpus, so add an empty input.
380 if (Options.Verbosity)
381 Printf("INFO: A corpus is not provided, starting from an empty corpus\n");
382 }
380383 F.ShuffleAndMinimize();
381384 if (Flags.drill)
382385 F.Drill();
117117
118118 RUN: LLVMFuzzer-SimpleTest -runs=10 --max_len=100 2>&1 | FileCheck %s --check-prefix=DASH_DASH
119119 DASH_DASH: WARNING: did you mean '-max_len=100' (single dash)?
120 DASH_DASH: INFO: A corpus is not provided, starting from an empty corpus