diff options
author | Kostya Serebryany <kcc@google.com> | 2017-01-05 04:32:19 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2017-01-05 04:32:19 +0000 |
commit | 2648243ebdb1df3dbef182fa062bf1a2a2d06109 (patch) | |
tree | bef6592e14629e427405c2992d8e2d2216236898 /llvm/lib/Fuzzer/FuzzerMerge.cpp | |
parent | 6196eaf0ae339ecfe8523eda37b1c758560786d2 (diff) | |
download | bcm5719-llvm-2648243ebdb1df3dbef182fa062bf1a2a2d06109.tar.gz bcm5719-llvm-2648243ebdb1df3dbef182fa062bf1a2a2d06109.zip |
[libFuzzer] use /tmp (or $TMPDIR, if present) to store temp files during merge
llvm-svn: 291078
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerMerge.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerMerge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerMerge.cpp b/llvm/lib/Fuzzer/FuzzerMerge.cpp index 84660e0fe53..b3d46435fcd 100644 --- a/llvm/lib/Fuzzer/FuzzerMerge.cpp +++ b/llvm/lib/Fuzzer/FuzzerMerge.cpp @@ -220,8 +220,8 @@ void Fuzzer::CrashResistantMerge(const std::vector<std::string> &Args, ListFilesInDirRecursive(Corpora[i], nullptr, &AllFiles, /*TopDir*/true); Printf("MERGE-OUTER: %zd files, %zd in the initial corpus\n", AllFiles.size(), NumFilesInFirstCorpus); - std::string CFPath = - "libFuzzerTemp." + std::to_string(GetPid()) + ".txt"; + auto CFPath = DirPlusFile(TmpDir(), + "libFuzzerTemp." + std::to_string(GetPid()) + ".txt"); // Write the control file. RemoveFile(CFPath); std::ofstream ControlFile(CFPath); |