Support specifying runtime fuzzing options in the fuzz target rule.
The initial set of options should include the maximum input length. That seems to be referenced in a number of fuzz targets in GRPC, for example.
It seems like options_file was added to the provider? What do we need to do next to get it available for cc_fuzz_test?
Apologies for the delay! This feature is currently deprioritized, because the consensus in our discussions with OSS-Fuzz is that the file should actually not be needed for the vast majority of purposes.
Can you share more info about your use case? I'm happy to reconsider the prioritization if there is functionality that can't be achieved without an options file.
I was looking for a way to set the maximum input length. Seems minor now that I changed the code to if (len > max) {return;}. Still seems like it wasting cycles though on large inputs.
I was looking for a way to set the maximum input length. Seems minor now that I changed the code to
if (len > max) {return;}. Still seems like it wasting cycles though on large inputs.
Ah, for that particular use case OSS-Fuzz actually recommends using the approach you just mentioned: https://google.github.io/oss-fuzz/getting-started/new-project-guide/#input-size
I believe this should not affect much the performance of the fuzzing engine - IIRC, libFuzzer will also not end up generating large inputs unless it observes they bring a coverage increase. With an early return statement like this one, it should not generate large inputs at all.
Do you happen to run on a seed corpus of large files? That might explain why the fuzzer attempts to generate large inputs.