Cargo-fuzz: Many scripts or one script dispatching on input data


It seems that while cargo-fuzz supports multiple fuzzer scripts, one could also use the first byte(s) of the input buffer to decide which test to run using the rest of the input buffer.

Does doing the latter confuse the fuzzer’s self-learning features? That is, if I want to fuzz foo() and bar() should I have two fuzzer scripts and make sure I remember to run both instead of having one script that checks a bit in the first input byte to decide between foo() and bar()?


I still don’t know what the right answer is, but absent advice either way, I went ahead with dispatching on the first bytes of the input buffer instead of writing many fuzzer scripts, and cargo-fuzz seems to work well enough that way.