blob: 0fe71fd46bf4ca5804fe553ffc6201518a8fac64 [file] [log] [blame]
Matt Morehouse52fd1692018-05-01 21:01:53 +00001// 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
12extern "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