summaryrefslogtreecommitdiff
path: root/lib/fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorMax Moroz <mmoroz@chromium.org>2018-05-23 19:42:30 +0000
committerMax Moroz <mmoroz@chromium.org>2018-05-23 19:42:30 +0000
commit8b089472c7978928d4c85464bbd72f6c6772a4e9 (patch)
tree5917c61fa4aba238e0fdd40a5a7dccbdc44f9a7d /lib/fuzzer/FuzzerLoop.cpp
parentcd0dd90d1b2ed7ceba5d950708de40f8c2fb4caa (diff)
[libFuzzer] Don't complain about lack of interesting inputs when -runs=0.
Summary: The most common usecase for -runs=0 is for generating code coverage over some corpus. Coverage reports based on sancov are about to be deprecated, which means some external coverage solution will be used, e.g. Clang source based code coverage, which does not use any sancov instrumentations and thus libFuzzer would consider any input to be not interesting in that case. Reviewers: kcc Reviewed By: kcc Subscribers: alex, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47271 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerLoop.cpp')
-rw-r--r--lib/fuzzer/FuzzerLoop.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fuzzer/FuzzerLoop.cpp b/lib/fuzzer/FuzzerLoop.cpp
index d5b949c5f..9c19ba913 100644
--- a/lib/fuzzer/FuzzerLoop.cpp
+++ b/lib/fuzzer/FuzzerLoop.cpp
@@ -743,7 +743,7 @@ void Fuzzer::ReadAndExecuteSeedCorpora(const Vector<std::string> &CorpusDirs) {
Printf("INFO: %zd/%zd inputs touch the focus function\n",
Corpus.NumInputsThatTouchFocusFunction(), Corpus.size());
- if (Corpus.empty()) {
+ if (Corpus.empty() && Options.MaxNumberOfRuns) {
Printf("ERROR: no interesting inputs were found. "
"Is the code instrumented for coverage? Exiting.\n");
exit(1);