diff options
| author | Matt Morehouse <mascasa@google.com> | 2017-07-20 20:43:39 +0000 |
|---|---|---|
| committer | Matt Morehouse <mascasa@google.com> | 2017-07-20 20:43:39 +0000 |
| commit | 9e689792b23b017507955dba1a0d21b239d4b869 (patch) | |
| tree | 4f9c3fb6fa5cdf34aa510b6456939ffed92e3d89 /llvm/lib/Fuzzer/FuzzerInternal.h | |
| parent | 0c8d26c312f62347e1640384c9a42fce97c2c657 (diff) | |
| download | bcm5719-llvm-9e689792b23b017507955dba1a0d21b239d4b869.tar.gz bcm5719-llvm-9e689792b23b017507955dba1a0d21b239d4b869.zip | |
Generate error reports when a fuzz target exits.
Summary:
Implements https://github.com/google/sanitizers/issues/835.
Flush stdout before exiting in test cases.
Since the atexit hook is used for exit reports, pending prints to
stdout can be lost if they aren't flushed before calling exit().
Expect tests to have non-zero exit code if exit() is called.
Reviewers: vitalybuka, kcc
Reviewed By: kcc
Subscribers: eraman, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D35602
llvm-svn: 308669
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInternal.h')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerInternal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInternal.h b/llvm/lib/Fuzzer/FuzzerInternal.h index 3fc3fe004ce..8602818a420 100644 --- a/llvm/lib/Fuzzer/FuzzerInternal.h +++ b/llvm/lib/Fuzzer/FuzzerInternal.h @@ -60,6 +60,7 @@ public: static void StaticAlarmCallback(); static void StaticCrashSignalCallback(); + static void StaticExitCallback(); static void StaticInterruptCallback(); static void StaticFileSizeExceedCallback(); @@ -91,6 +92,7 @@ public: private: void AlarmCallback(); void CrashCallback(); + void ExitCallback(); void CrashOnOverwrittenData(); void InterruptCallback(); void MutateAndTestOne(); |

