Skip to content

proposal: cmd/go: fuzzing option to add the last few "interesting" inputs to the seed corpus #76018

Open

Description

@myaaaaaaaaa

Proposal Details

This is somewhat of a successor to this declined proposal, with the same motivation:

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.

Activity

  1. 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
  2. added this to the Proposal milestone on Oct 23, 2025
  3. Jorropo commented on Oct 24, 2025

    @Jorropo
    Member

    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 ?

  4. myaaaaaaaaa commented on Oct 24, 2025

    @myaaaaaaaaa
    Author

    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.

  5. Jorropo commented on Oct 25, 2025

    @Jorropo
    Member

    So you want interesting inputs to be added to the testdata folder ?

  6. myaaaaaaaaa commented on Oct 25, 2025

    @myaaaaaaaaa
    Author

    In short, yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions