blob: 29ddb02ebaea3ecbbfc0163135d497a3d6fb0ab3 [file] [log] [blame]
Kostya Serebryanybe5e0ed2015-03-03 23:27:02 +00001// Test for a fuzzer: must find the case where a particular basic block is
2// executed many times.
3#include <iostream>
4
Kostya Serebryany566bc5a2015-05-06 22:19:00 +00005extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
Kostya Serebryanybe5e0ed2015-03-03 23:27:02 +00006 int Num = 0;
7 for (size_t i = 0; i < Size; i++)
8 if (Data[i] == 'A' + i)
9 Num++;
10 if (Num >= 4) {
11 std::cerr << "BINGO!\n";
12 exit(1);
13 }
14}