| commit | ca6a2a2f1ca1419ee3e695567022fe883a57690e | [log] [tgz] |
|---|---|---|
| author | Kostya Serebryany <kcc@google.com> | Tue May 05 21:59:51 2015 +0000 |
| committer | Kostya Serebryany <kcc@google.com> | Tue May 05 21:59:51 2015 +0000 |
| tree | a19b7900e542b05c5b83e31b7bb77a6e6b5a4c93 | |
| parent | 6d721fa28c868eaaf06ab417131c10d13c3ed10f [diff] [blame] |
[lib/Fuzzer] on crash print the contents of the crashy input as base64 llvm-svn: 236548
diff --git a/llvm/lib/Fuzzer/FuzzerIO.cpp b/llvm/lib/Fuzzer/FuzzerIO.cpp index ef23d42..81f37aa 100644 --- a/llvm/lib/Fuzzer/FuzzerIO.cpp +++ b/llvm/lib/Fuzzer/FuzzerIO.cpp
@@ -60,4 +60,9 @@ return DirPath + "/" + FileName; } +void PrintFileAsBase64(const std::string &Path) { + std::string Cmd = "base64 -w 0 < " + Path + "; echo"; + system(Cmd.c_str()); +} + } // namespace fuzzer