| 168 | } |
| 169 | |
| 170 | void Generator::generateCorpus(std::vector<std::shared_ptr<Fuzzer>> &Fuzzers, |
| 171 | std::string OutputDir) const { |
| 172 | |
| 173 | OutputDir = OutputDir + PATH_SEPARATOR + "corpus"; |
| 174 | if (fs::exists(OutputDir)) |
| 175 | fs::remove_all(OutputDir); |
| 176 | assert(fs::create_directories(OutputDir) && "Unexpected Program State"); |
| 177 | |
| 178 | for (auto &F : Fuzzers) { |
| 179 | assert(F && "Unexpected Program State"); |
| 180 | if (F->getFuzzInputMap().size() == 0) |
| 181 | continue; |
| 182 | |
| 183 | generateCorpus(*F, OutputDir); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | void Generator::generateCorpus(const Fuzzer &F, std::string OutputDir) const { |
| 188 | |