summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-07-20 01:35:17 +0000
committerKostya Serebryany <kcc@google.com>2017-07-20 01:35:17 +0000
commite55828c7403d038dedae640bd63f23f1f91ffac1 (patch)
tree96f22dc969ce124308d58a1b0cc342f67970d736 /llvm/lib/Fuzzer/test
parentc20b3383b78473fdfb958ebfe15227bded79ba78 (diff)
downloadbcm5719-llvm-e55828c7403d038dedae640bd63f23f1f91ffac1.tar.gz
bcm5719-llvm-e55828c7403d038dedae640bd63f23f1f91ffac1.zip
[libFuzzer] prototype implementation of recursion-depth coverage features (commented out; real implementation needs to use inlined instrumentation)
llvm-svn: 308577
Diffstat (limited to 'llvm/lib/Fuzzer/test')
-rw-r--r--llvm/lib/Fuzzer/test/DeepRecursionTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/test/DeepRecursionTest.cpp b/llvm/lib/Fuzzer/test/DeepRecursionTest.cpp
index 39a1602d7ac..bf4621d0492 100644
--- a/llvm/lib/Fuzzer/test/DeepRecursionTest.cpp
+++ b/llvm/lib/Fuzzer/test/DeepRecursionTest.cpp
@@ -3,7 +3,7 @@
// Simple test for a fuzzer. The fuzzer must find the deep recursion.
// To generate a crashy input:
-// for((i=0;i<100;i++)); do echo -n ABCDEFGHIJKLMNOPQRSTUVWXYZ >> INPUT; done
+// for((i=0;i<110;i++)); do echo -n ABCDEFGHIJ >> INPUT; done
#include <cstddef>
#include <cstdint>
#include <cstdlib>
@@ -13,7 +13,7 @@ static volatile int Sink;
void Recursive(const uint8_t *Data, size_t Size, int Depth) {
if (Depth > 1000) abort();
if (!Size) return;
- if (*Data == ('A' + Depth % 26))
+ if (*Data == ('A' + Depth % 10))
Recursive(Data + 1, Size - 1, Depth + 1);
Sink++;
}
OpenPOWER on IntegriCloud