diff options
author | Kostya Serebryany <kcc@google.com> | 2016-08-15 17:48:28 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-08-15 17:48:28 +0000 |
commit | dfbe59b03db728a0cdfdf1bf763439a511c5ee09 (patch) | |
tree | aaf9658c1515c4d6dce4df3c2adc4717e1c1820d /llvm/lib/Fuzzer/test/StrcmpTest.cpp | |
parent | d09a44a2201d49a5a8965156035b8b19d610e252 (diff) | |
download | bcm5719-llvm-dfbe59b03db728a0cdfdf1bf763439a511c5ee09.tar.gz bcm5719-llvm-dfbe59b03db728a0cdfdf1bf763439a511c5ee09.zip |
[libFuzzer] add InsertRepeatedBytes and EraseBytes.
New mutation: InsertRepeatedBytes.
Updated mutation: EraseByte => EraseBytes.
This helps https://github.com/google/sanitizers/issues/710
where libFuzzer was not able to find a known bug.
Now it finds it in minutes.
Hopefully, the change is general enough to help other targets.
llvm-svn: 278687
Diffstat (limited to 'llvm/lib/Fuzzer/test/StrcmpTest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/StrcmpTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Fuzzer/test/StrcmpTest.cpp b/llvm/lib/Fuzzer/test/StrcmpTest.cpp index 5a132990461..cd91dda76f3 100644 --- a/llvm/lib/Fuzzer/test/StrcmpTest.cpp +++ b/llvm/lib/Fuzzer/test/StrcmpTest.cpp @@ -20,9 +20,9 @@ bool Eq(const uint8_t *Data, size_t Size, const char *Str) { } extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - if (Eq(Data, Size, "AAA") && - Size >= 3 && Eq(Data + 3, Size - 3, "BBBB") && - Size >= 7 && Eq(Data + 7, Size - 7, "CCCCCC") && + if (Eq(Data, Size, "ABC") && + Size >= 3 && Eq(Data + 3, Size - 3, "QWER") && + Size >= 7 && Eq(Data + 7, Size - 7, "ZXCVN") && Size >= 14 && Data[13] == 42 ) { fprintf(stderr, "BINGO\n"); |