forked from OSchip/llvm-project
[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
This commit is contained in:
parent
8c39d01670
commit
d1e222e552
|
@ -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.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue