Keep fuzz inputs for older branches#274
Conversation
f131dae to
4babc48
Compare
|
4babc48 looks good to me now. Updated PR description. I ran this against a test fuzz corpora in ekzyis@a4ef010 (a different branch) to speed things up. Took 30 minutes with I had to allow empty commits because fuzzing another ref might not lead to any new fuzz inputs. |
13a8c51 to
11d2d33
Compare
|
Thanks for the review! I didn't squash the commits yet. I thought it would make the next review easier. I'm currently debugging why I can't use |
11d2d33 to
4373c77
Compare
|
Squashed all commits into 4373c77. Btw, I didn't make sure that libFuzzer will only add fuzz targets to the output directory, and not delete the ones in the output directory that don't increase coverage for the fuzzed binary. I only looked at the documentation for
For // Merges all corpora into the first corpus. A file is added into
// the first corpus only if it adds new features. Unlike `Merger::Merge`,
// this implementation calculates an approximation of the minimum set
// of corpora files, that cover all known features (set cover problem).
// Generally, this means that files with more features are preferred for
// merge into the first corpus. When two files have the same number of
// features, the smaller one is preferred.
size_t Merger::SetCoverMerge(const std::set<uint32_t> &InitialFeatures, |
| for name in names { | ||
| let from = dir.join(&name); | ||
| let to = parent.join(&name); | ||
| fs::rename(&from, &to).map_err(|e| format!("fs::rename failed: {}", e.to_string()))?; |
There was a problem hiding this comment.
heh, I guess there could be a check to see if the file to exists, and then delete from. Otherwise, keep the move. This would allow to use remove_dir, but not important. Either way is fine.
close #265
see comment below for more information