diff options
author | Kostya Serebryany <kcc@google.com> | 2015-05-05 21:59:51 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2015-05-05 21:59:51 +0000 |
commit | ca6a2a2f1ca1419ee3e695567022fe883a57690e (patch) | |
tree | a19b7900e542b05c5b83e31b7bb77a6e6b5a4c93 /llvm/lib/Fuzzer/FuzzerIO.cpp | |
parent | 6d721fa28c868eaaf06ab417131c10d13c3ed10f (diff) | |
download | llvm-ca6a2a2f1ca1419ee3e695567022fe883a57690e.zip llvm-ca6a2a2f1ca1419ee3e695567022fe883a57690e.tar.gz llvm-ca6a2a2f1ca1419ee3e695567022fe883a57690e.tar.bz2 |
[lib/Fuzzer] on crash print the contents of the crashy input as base64
llvm-svn: 236548
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerIO.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerIO.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerIO.cpp b/llvm/lib/Fuzzer/FuzzerIO.cpp index ef23d42e..81f37aa 100644 --- a/llvm/lib/Fuzzer/FuzzerIO.cpp +++ b/llvm/lib/Fuzzer/FuzzerIO.cpp @@ -60,4 +60,9 @@ std::string DirPlusFile(const std::string &DirPath, return DirPath + "/" + FileName; } +void PrintFileAsBase64(const std::string &Path) { + std::string Cmd = "base64 -w 0 < " + Path + "; echo"; + system(Cmd.c_str()); +} + } // namespace fuzzer |