summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerFork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerFork.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerFork.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerFork.cpp b/compiler-rt/lib/fuzzer/FuzzerFork.cpp
index 9d338aa4708..dd16ec1e288 100644
--- a/compiler-rt/lib/fuzzer/FuzzerFork.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerFork.cpp
@@ -66,6 +66,7 @@ struct FuzzJob {
std::string CorpusDir;
std::string FeaturesDir;
std::string LogPath;
+ std::string SeedListPath;
std::string CFPath;
// Fuzzing Outputs.
@@ -74,6 +75,7 @@ struct FuzzJob {
~FuzzJob() {
RemoveFile(CFPath);
RemoveFile(LogPath);
+ RemoveFile(SeedListPath);
RmDirRecursive(CorpusDir);
RmDirRecursive(FeaturesDir);
}
@@ -121,8 +123,11 @@ struct GlobalEnv {
for (size_t i = 0; i < CorpusSubsetSize; i++)
Seeds += (Seeds.empty() ? "" : ",") +
Files[Rand->SkewTowardsLast(Files.size())];
- if (!Seeds.empty())
- Cmd.addFlag("seed_inputs", Seeds);
+ if (!Seeds.empty()) {
+ Job->SeedListPath = std::to_string(JobId) + ".seeds";
+ WriteToFile(Seeds, Job->SeedListPath);
+ Cmd.addFlag("seed_inputs", "@" + Job->SeedListPath);
+ }
Job->LogPath = DirPlusFile(TempDir, std::to_string(JobId) + ".log");
Job->CorpusDir = DirPlusFile(TempDir, "C" + std::to_string(JobId));
Job->FeaturesDir = DirPlusFile(TempDir, "F" + std::to_string(JobId));
OpenPOWER on IntegriCloud