trailofbits / trailofbits/test-fuzz

feature request: support list of generic args

Open
#477 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
208
Forks
27
Avg merge
9h 14m
Merged PRs (30d)
9

Description

If I have fn roundtrip<T>, I would think test-fuzz can maintain a separate corpus for each T, and generate an entrypoint for each one. However, I must specify T e.g. #[test_fuzz(generic_args = "String")] and can only provide one type as a list will fail to be parsed by the proc macro.

It would be nice to generate a binary for each generic arg in the list and be able to run all of them without having to replace the type manually. Maybe I am missing a better way to do this...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the #[test_fuzz(generic_args = "String")] proc macro parses and uses its single generic type for fn roundtrip<T>. Determine the intended list syntax and how separate corpora and entrypoints should be generated for each type. Done means a list of generic arguments parses successfully and all corresponding fuzzing binaries can be run without manual replacement.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.