1 // This file is distributed under the University of Illinois Open Source 2 // License. See LICENSE.TXT for details. 3 4 // Crash on the N-th execution. 5 #include <cstddef> 6 #include <cstdint> 7 #include <iostream> 8 #include <ostream> 9 10 static int Counter; 11 12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 13 if (Counter++ == 1000) { 14 std::cout << "BINGO; Found the target, exiting\n" << std::flush; 15 exit(1); 16 } 17 return 0; 18 } 19 20