1 // This file is distributed under the University of Illinois Open Source 2 // License. See LICENSE.TXT for details. 3 4 // Ensures that error reports are suppressed after 5 // __sanitizer_acquire_crash_state() has been called the first time. 6 #include "sanitizer/common_interface_defs.h" 7 8 #include <cassert> 9 #include <cstdint> 10 #include <cstdlib> 11 12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 13 assert(Data); 14 if (Size == 0) return 0; 15 __sanitizer_acquire_crash_state(); 16 exit(0); // No report should be generated here. 17 } 18 19