[PATCH] D68067: [libFuzzer] Dump trace and provide correct msg for overwritten input.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 18:05:56 PDT 2019


hctim created this revision.
hctim added a reviewer: morehouse.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

Now crashes with a stacktrace and uses 'overwrites-const-input' as the error
message instead of 'out-of-memory'.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68067

Files:
  compiler-rt/lib/fuzzer/FuzzerLoop.cpp


Index: compiler-rt/lib/fuzzer/FuzzerLoop.cpp
===================================================================
--- compiler-rt/lib/fuzzer/FuzzerLoop.cpp
+++ compiler-rt/lib/fuzzer/FuzzerLoop.cpp
@@ -515,8 +515,10 @@
 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.
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68067.221874.patch
Type: text/x-patch
Size: 599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190926/f917984b/attachment.bin>


More information about the llvm-commits mailing list