cargo-fuzz icon indicating copy to clipboard operation
cargo-fuzz copied to clipboard

Should create corpus directory with the creation of fuzz directory

Open nagisa opened this issue 7 years ago • 3 comments

nagisa avatar Feb 24 '17 16:02 nagisa

Not exactly. cargo fuzz --init is something you run once, check in, and no other contributor runs again. Since the directory is gitignored, it can't be checked in. This is why we do this at fuzz-time.

We could still create it at init time, but we should also create it at fuzz time.

Manishearth avatar Feb 24 '17 17:02 Manishearth

There’s a caveat then. Half of the point of the corpus directory is to add starting sample data, for fuzzer to use, not only to save intermediate results.

In that sense, to provide any starting data, you have to create the directory yourself. For that same reason we should also be using per-fuzz-target-script corpuses, but that’s a different issue.

nagisa avatar Feb 24 '17 17:02 nagisa

Yeah. So we should create it in both fuzz and init.

Manishearth avatar Feb 24 '17 17:02 Manishearth