summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-12-04 22:29:39 +0000
committerKostya Serebryany <kcc@google.com>2015-12-04 22:29:39 +0000
commit9e48cda9bc15eef44ee72f4464edf1bbe5aa7267 (patch)
tree7e3f74d1798ad4423cfdcb20bfb777a7e7fd7a90 /llvm/lib/Fuzzer/FuzzerLoop.cpp
parent2f107ce1325cda843a548b15a5cad2dfe3162766 (diff)
downloadbcm5719-llvm-9e48cda9bc15eef44ee72f4464edf1bbe5aa7267.tar.gz
bcm5719-llvm-9e48cda9bc15eef44ee72f4464edf1bbe5aa7267.zip
[libFuzzer] compute base64 in-process instead of using an external lib. Since libFuzzer should not depend on anything, just re-implement base64 encoder. PR25746
llvm-svn: 254784
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerLoop.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp
index 9c52a4dbe77..ca7f82b5560 100644
--- a/llvm/lib/Fuzzer/FuzzerLoop.cpp
+++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp
@@ -302,10 +302,8 @@ void Fuzzer::WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix) {
WriteToFile(U, Path);
Printf("artifact_prefix='%s'; Test unit written to %s\n",
Options.ArtifactPrefix.c_str(), Path.c_str());
- if (U.size() <= kMaxUnitSizeToPrint) {
- Printf("Base64: ");
- PrintFileAsBase64(Path);
- }
+ if (U.size() <= kMaxUnitSizeToPrint)
+ Printf("Base64: %s\n", Base64(U).c_str());
}
void Fuzzer::SaveCorpus() {
OpenPOWER on IntegriCloud