diff options
author | Kostya Serebryany <kcc@google.com> | 2015-02-19 18:21:12 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2015-02-19 18:21:12 +0000 |
commit | 2117269dd1fb7355fb7a3c6b83046c9973b161b3 (patch) | |
tree | 7f89ed2a82714dcbc23462957907f5b3ed2ca126 /llvm/lib/Fuzzer | |
parent | 3f1c2852942f3686f9c4e90e9033335da62d12c4 (diff) | |
download | bcm5719-llvm-2117269dd1fb7355fb7a3c6b83046c9973b161b3.tar.gz bcm5719-llvm-2117269dd1fb7355fb7a3c6b83046c9973b161b3.zip |
[fuzzer] properly annotate fallthrough, add one more entry to FAQ
llvm-svn: 229880
Diffstat (limited to 'llvm/lib/Fuzzer')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerMutate.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Fuzzer/README.txt | 6 |
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. |