[dev.fuzz] internal/fuzz: don't store corpus in memory #46669
Labels
FrozenDueToAge
fuzz
Issues related to native fuzzing support
NeedsFix
The path to resolution is known, but the work has not been done.
Currently the coordinator will read all on the input corpus into memory, and store any newly discovered inputs in memory as well. For large corpora this will result in significant memory usage (see #44517).
Instead the coordinator should only read inputs from disk when necessary, storing a list of input paths that are available, and only hold them as long as is necessary to send the input to a worker.
One open question is how to handle inputs added via
f.Add
, since they only ever existed in memory. We could add these to the corpus cache, so there are files for them, or store just these values in memory (in CorpusEntry have eithervalue
orfilepath
maybe?) and document that if you have a lot of these kinds of inputs you should store them as files rather than adding them viaf.Add
(I've seen a number of targets which decompress archives of inputs and then add them viaf.Add
, so this may not be viable for everyone).The text was updated successfully, but these errors were encountered: