[compiler-rt] r373130 - [libFuzzer] Dump trace and provide correct msg for overwritten input.
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 15:04:36 PDT 2019
Author: hctim
Date: Fri Sep 27 15:04:36 2019
New Revision: 373130
URL: http://llvm.org/viewvc/llvm-project?rev=373130&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp
Modified: compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp?rev=373130&r1=373129&r2=373130&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp (original)
+++ compiler-rt/trunk/lib/fuzzer/FuzzerLoop.cpp Fri Sep 27 15:04:36 2019
@@ -515,8 +515,10 @@ size_t Fuzzer::GetCurrentUnitInFuzzingTh
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.
}
More information about the llvm-commits
mailing list