diff options
author | Kostya Serebryany <kcc@google.com> | 2016-09-30 22:29:57 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-09-30 22:29:57 +0000 |
commit | e7e790bad6217a09a3b7d74865eb5a34c10514d8 (patch) | |
tree | 8debbb567e1387fc7737da53fee05c0a4acc5ce3 /llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp | |
parent | fad073a6ab55cc85e31038938d0debf9ae229b71 (diff) | |
download | bcm5719-llvm-e7e790bad6217a09a3b7d74865eb5a34c10514d8.tar.gz bcm5719-llvm-e7e790bad6217a09a3b7d74865eb5a34c10514d8.zip |
[libFuzzer] remove unused option
llvm-svn: 282971
Diffstat (limited to 'llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp b/llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp index 2ab5781155f..b624088b902 100644 --- a/llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp +++ b/llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp @@ -15,10 +15,16 @@ static const char *Separator = "-_^_-"; static const char *Target = "012-_^_-abc"; +static volatile int sink; + extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { assert(Data); std::string Str(reinterpret_cast<const char *>(Data), Size); + // Ensure that two different elements exist in the corpus. + if (Size && Data[0] == '0') sink++; + if (Size && Data[0] == 'a') sink--; + if (Str.find(Target) != std::string::npos) { std::cout << "BINGO; Found the target, exiting\n"; exit(1); |