From: Kostya Serebryany Date: Thu, 19 Feb 2015 18:21:12 +0000 (+0000) Subject: [fuzzer] properly annotate fallthrough, add one more entry to FAQ X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=0b1ec08b7782983e914519c32fa82801e541a19a [fuzzer] properly annotate fallthrough, add one more entry to FAQ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229880 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Fuzzer/FuzzerMutate.cpp b/lib/Fuzzer/FuzzerMutate.cpp index 60d5623ada6..b28264ac8c1 100644 --- a/lib/Fuzzer/FuzzerMutate.cpp +++ b/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/lib/Fuzzer/README.txt b/lib/Fuzzer/README.txt index 1e1acbbe1dd..e4d6b4f2079 100644 --- a/lib/Fuzzer/README.txt +++ b/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.