You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
proposal: cmd/go: fuzzing option to add the last few "interesting" inputs to the seed corpus #76018
I'm too lazy to come up with a seed corpus for otherwise succeeding tests.
Essentially, the last few "interesting" inputs are the most difficult ones to find. I think they're the best candidates for checking into the seed corpus.
Saving just those means that future fuzzing runs can reach maximum coverage much faster, with minimum repository bloat.
changed the title [-]proposal: cmd/go: option to add the last few "interesting" inputs to the seed corpus[/-][+]proposal: cmd/go: fuzzing option to add the last few "interesting" inputs to the seed corpus[/+]on Oct 23, 2025
We already store all interesting cases in the fuzzcache, and the fuzzcache is loaded and re-tested in the gathering baseline coverage part when you start fuzzing.
Outside of using all test cases vs some amount of recently found one, how is your proposal different ?
Adding them into the seed corpus means they would run automatically as part of go test. This improved determinism and repeatability is more compatible with CI. It also means that only one developer needs to pay the cost of fuzzing, and then other developers who don't fuzz during development also get the benefits.
Essentially, I am treating this as a more advanced form of table-driven tests. I would like to be able to write some property tests, and have the fuzzer automatically populate a test table for them. Use of coverage guiding means that this test table will contain very diverse test cases.
Presumably, some users would like to limit the size of this test table, and avoid checking every single interesting input into the seed corpus. Hence the "last few interesting inputs" part, which I think is better than using the first few interesting inputs.
Activity
[-]proposal: cmd/go: option to add the last few "interesting" inputs to the seed corpus[/-][+]proposal: cmd/go: fuzzing option to add the last few "interesting" inputs to the seed corpus[/+]Jorropo commentedon Oct 24, 2025
We already store all interesting cases in the fuzzcache, and the fuzzcache is loaded and re-tested in the
gathering baseline coveragepart when you start fuzzing.Outside of using all test cases vs some amount of recently found one, how is your proposal different ?
myaaaaaaaaa commentedon Oct 24, 2025
Adding them into the seed corpus means they would run automatically as part of
go test. This improved determinism and repeatability is more compatible with CI. It also means that only one developer needs to pay the cost of fuzzing, and then other developers who don't fuzz during development also get the benefits.Essentially, I am treating this as a more advanced form of table-driven tests. I would like to be able to write some property tests, and have the fuzzer automatically populate a test table for them. Use of coverage guiding means that this test table will contain very diverse test cases.
Presumably, some users would like to limit the size of this test table, and avoid checking every single interesting input into the seed corpus. Hence the "last few interesting inputs" part, which I think is better than using the first few interesting inputs.
Jorropo commentedon Oct 25, 2025
So you want interesting inputs to be added to the
testdatafolder ?myaaaaaaaaa commentedon Oct 25, 2025
In short, yes