1 // Test for a fuzzer: must find the case where a particular basic block is 2 // executed many times. 3 #include <iostream> 4 LLVMFuzzerTestOneInput(const uint8_t * Data,size_t Size)5extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 6 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 return 0; 15 } 16