Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: fuzzing: no string comparison instrumentation? #50231

Closed
Crypt-iQ opened this issue Dec 16, 2021 · 2 comments
Closed

testing: fuzzing: no string comparison instrumentation? #50231

Crypt-iQ opened this issue Dec 16, 2021 · 2 comments
Labels
FeatureRequest fuzz Issues related to native fuzzing support NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@Crypt-iQ
Copy link

Crypt-iQ commented Dec 16, 2021

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!")
		}
	})
}
@cherrymui cherrymui added the fuzz Issues related to native fuzzing support label Dec 16, 2021
@cherrymui cherrymui changed the title go1.18 fuzzing: no string comparison instrumentation? testing: fuzzing: no string comparison instrumentation? Dec 16, 2021
@cherrymui cherrymui added this to the Backlog milestone Dec 16, 2021
@cherrymui
Copy link
Member

cherrymui commented Dec 16, 2021

We don't really use our issue tracker for questions. More people will see your question, and you will get better answers, if you ask on a forum rather than on the issue tracker. See https://golang.org/wiki/Questions. Thanks.

cc @golang/fuzzing in case this is something the implementation missed.

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 16, 2021
@rolandshoemaker
Copy link
Member

rolandshoemaker commented Dec 16, 2021

String comparison instrumentation is not present. It is one of the additional fuzzing strategies discussed in #46507, and is likely to be included in 1.19 as we continue to develop the fuzzing engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest fuzz Issues related to native fuzzing support NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: No status
Development

No branches or pull requests

4 participants