summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Fuzzer/FuzzerMutate.cpp2
-rw-r--r--llvm/lib/Fuzzer/README.txt6
2 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerMutate.cpp b/llvm/lib/Fuzzer/FuzzerMutate.cpp
index 60d5623ada6..b28264ac8c1 100644
--- a/llvm/lib/Fuzzer/FuzzerMutate.cpp
+++ b/llvm/lib/Fuzzer/FuzzerMutate.cpp
@@ -47,7 +47,7 @@ void Mutate(Unit *U, size_t MaxLen) {
U->erase(U->begin() + rand() % U->size());
break;
}
- // Fallthrough
+ [[clang::fallthrough]];
case 1:
if (U->size() < MaxLen) {
U->insert(U->begin() + rand() % U->size(), RandCh());
diff --git a/llvm/lib/Fuzzer/README.txt b/llvm/lib/Fuzzer/README.txt
index 1e1acbbe1dd..e4d6b4f2079 100644
--- a/llvm/lib/Fuzzer/README.txt
+++ b/llvm/lib/Fuzzer/README.txt
@@ -104,3 +104,9 @@ A.
more) the speed benefit from the in-process fuzzer is negligible.
* If the target library runs persistent threads (that outlive
execution of one test) the fuzzing results will be unreliable.
+
+Q. So, what exactly this Fuzzer is good for?
+A. This Fuzzer might be a good choice for testing libraries that have relatively
+small inputs, each input takes < 1ms to run, and the library code is not expected
+to crash on invalid inputs.
+Examples: regular expression matchers, text or binary format parsers.
OpenPOWER on IntegriCloud