-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.fuzzIssues related to native fuzzing supportIssues related to native fuzzing support
Milestone
Description
Currently, the fuzzing engine marks an input as "interesting" if it activates coverage counters that were not activated before. Interesting inputs are minimized and added to the cached corpus. New inputs may be derived from them.
Fuzz target authors may not want to spend time fuzzing certain kinds of inputs, for example, because they're unlikely to find bugs or because they're expensive or impractical to test. It would be useful to have some signal that an input is not interesting and should not be added to the cached corpus. T.Skip seems like a reasonable way to do that.
func FuzzSqrt(f *testing.T) {
f.Add(2.0)
f.Add(99.9)
f.Fuzz(func(t *testing.T, v float64) {
if v < 0 {
t.Skip()
}
s := math.Sqrt(v)
if math.Abs(s*s - v) >= 0.001 {
t.Fatal()
}
})
}
Compare with go-fuzz, which has a similar feature: the fuzz function may return:
- +1 for an interesting input that should be given priority (we have no way to express this yet)
- 0 normally
- -1 for an input that should not be added to the corpus, even if it exposes new coverage (this feature)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.fuzzIssues related to native fuzzing supportIssues related to native fuzzing support
Type
Projects
Status
No status