[lib/Fuzzer] on crash print the contents of the crashy input as base64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany
2015-05-05 21:59:51 +00:00
parent cc0615ad0a
commit 605f316258
3 changed files with 8 additions and 0 deletions

View File

@@ -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