summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorMitch Phillips <mitchphillips@outlook.com>2019-09-27 22:04:36 +0000
committerMitch Phillips <mitchphillips@outlook.com>2019-09-27 22:04:36 +0000
commitd1e222e552d9f3d83083220e186c1f4c925e3e9c (patch)
tree5d60948e094ce2d54923ae75ce5e34ca545f9ae1 /compiler-rt/lib/fuzzer/FuzzerLoop.cpp
parent8c39d016705e04be7dcfddae8997a36fcd0ee30d (diff)
downloadbcm5719-llvm-d1e222e552d9f3d83083220e186c1f4c925e3e9c.tar.gz
bcm5719-llvm-d1e222e552d9f3d83083220e186c1f4c925e3e9c.zip
[libFuzzer] Dump trace and provide correct msg for overwritten input.
Summary: Now crashes with a stacktrace and uses 'overwrites-const-input' as the error message instead of 'out-of-memory'. Reviewers: morehouse, Dor1s Reviewed By: morehouse, Dor1s Subscribers: #sanitizers, llvm-commits, metzman, Dor1s Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68067 llvm-svn: 373130
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerLoop.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerLoop.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
index 7150a116be9..96ab544b15c 100644
--- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp
@@ -515,8 +515,10 @@ size_t Fuzzer::GetCurrentUnitInFuzzingThead(const uint8_t **Data) const {
void Fuzzer::CrashOnOverwrittenData() {
Printf("==%d== ERROR: libFuzzer: fuzz target overwrites its const input\n",
GetPid());
+ PrintStackTrace();
+ Printf("SUMMARY: libFuzzer: overwrites-const-input\n");
DumpCurrentUnit("crash-");
- Printf("SUMMARY: libFuzzer: out-of-memory\n");
+ PrintFinalStats();
_Exit(Options.ErrorExitCode); // Stop right now.
}
OpenPOWER on IntegriCloud