1 // This file is distributed under the University of Illinois Open Source 2 // License. See LICENSE.TXT for details. 3 4 // Contains dummy functions used to avoid dependency on AFL. 5 #include <stdint.h> 6 #include <stdio.h> 7 #include <stdlib.h> 8 9 extern "C" void __afl_manual_init() {} 10 11 extern "C" int __afl_persistent_loop(unsigned int N) { 12 static int Count = N; 13 fprintf(stderr, "__afl_persistent_loop calle, Count = %d\n", Count); 14 if (Count--) return 1; 15 return 0; 16 } 17 18 // This declaration exists to prevent the Darwin linker 19 // from complaining about this being a missing weak symbol. 20 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { 21 fprintf(stderr, "LLVMFuzzerInitialize called\n"); 22 return 0; 23 } 24 25 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 26 fprintf(stderr, "LLVMFuzzerTestOneInput called; Size = %zd\n", Size); 27 return 0; 28 } 29