Skip to content

testing: fuzzing: no string comparison instrumentation? #50231

@Crypt-iQ

Description

@Crypt-iQ

go1.18beta1 fuzzer is unable to figure out "tomatos" is a crasher after almost 40M iterations. Is string comparison not instrumented in go1.18 beta or perhaps there is a flag that I am missing? I was able to write a very similar test case with dvyukov's go-fuzz and it crashes in about 25 fuzzing iterations.

func FuzzThing(f *testing.F) {
	f.Fuzz(func(t *testing.T, b []byte) {
		if len(b) < 6 {
			return
		}

		if string(b) == "tomatos" {
			t.Fatalf("error!")
		}
	})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues 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.fuzzIssues related to native fuzzing support

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions