mirror of
https://github.com/RPCSX/llvm.git
synced 2026-01-31 01:05:23 +01:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260649 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
300 B
C++
16 lines
300 B
C++
// Crash on the N-th execution.
|
|
#include <cstdint>
|
|
#include <cstddef>
|
|
#include <iostream>
|
|
|
|
static int Counter;
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
|
if (Counter++ == 1000) {
|
|
std::cout << "BINGO; Found the target, exiting\n";
|
|
exit(1);
|
|
}
|
|
return 0;
|
|
}
|
|
|