[PATCH] D27577: [libFuzzer] Diff 18 - Avoid name collision with Windows API.
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 09:57:05 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL289563: [libFuzzer] Avoid name collision with Windows API. (authored by mpividori).
Changed prior to commit:
https://reviews.llvm.org/D27577?vs=80771&id=81246#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27577
Files:
llvm/trunk/lib/Fuzzer/FuzzerCorpus.h
llvm/trunk/lib/Fuzzer/FuzzerIO.h
llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp
llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
llvm/trunk/lib/Fuzzer/FuzzerMerge.cpp
Index: llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
+++ llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
@@ -135,7 +135,7 @@
return _dup(Fd);
}
-void DeleteFile(const std::string &Path) {
+void RemoveFile(const std::string &Path) {
_unlink(Path.c_str());
}
Index: llvm/trunk/lib/Fuzzer/FuzzerCorpus.h
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerCorpus.h
+++ llvm/trunk/lib/Fuzzer/FuzzerCorpus.h
@@ -119,7 +119,7 @@
void DeleteInput(size_t Idx) {
InputInfo &II = *Inputs[Idx];
if (!OutputCorpus.empty() && II.MayDeleteFile)
- DeleteFile(DirPlusFile(OutputCorpus, Sha1ToString(II.Sha1)));
+ RemoveFile(DirPlusFile(OutputCorpus, Sha1ToString(II.Sha1)));
Unit().swap(II.U);
if (FeatureDebug)
Printf("EVICTED %zd\n", Idx);
Index: llvm/trunk/lib/Fuzzer/FuzzerIO.h
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerIO.h
+++ llvm/trunk/lib/Fuzzer/FuzzerIO.h
@@ -57,7 +57,7 @@
int DuplicateFile(int Fd);
-void DeleteFile(const std::string &Path);
+void RemoveFile(const std::string &Path);
} // namespace fuzzer
Index: llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp
+++ llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp
@@ -71,7 +71,7 @@
return dup(Fd);
}
-void DeleteFile(const std::string &Path) {
+void RemoveFile(const std::string &Path) {
unlink(Path.c_str());
}
Index: llvm/trunk/lib/Fuzzer/FuzzerMerge.cpp
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerMerge.cpp
+++ llvm/trunk/lib/Fuzzer/FuzzerMerge.cpp
@@ -221,7 +221,7 @@
std::string CFPath =
"libFuzzerTemp." + std::to_string(GetPid()) + ".txt";
// Write the control file.
- DeleteFile(CFPath);
+ RemoveFile(CFPath);
std::ofstream ControlFile(CFPath);
ControlFile << AllFiles.size() << "\n";
ControlFile << NumFilesInFirstCorpus << "\n";
@@ -253,7 +253,7 @@
for (auto &F: NewFiles)
WriteToOutputCorpus(FileToVector(F));
// We are done, delete the control file.
- DeleteFile(CFPath);
+ RemoveFile(CFPath);
}
} // namespace fuzzer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27577.81246.patch
Type: text/x-patch
Size: 2355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161213/1d454d25/attachment.bin>
More information about the llvm-commits
mailing list