-
Notifications
You must be signed in to change notification settings - Fork 279
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
go-fuzz: add fuzz.F #223
base: master
Are you sure you want to change the base?
go-fuzz: add fuzz.F #223
Conversation
This is initial work towards dvyukov#218.
Good that you preserved backwards compatibility! Re cumbersome, do you mean the large code template embed in the code? I am not too worried about strictly internal details that we are free to change at any time. Re goroutine per test, the only reason for this is Skip/Goexit, right? |
Have you considered panicing and recovering? I think the same could be used for Fail as well. |
Yes.
Fair enough.
Yes.
If the fuzz function calls recover, then we might never see the panic. This is the same reason that package testing uses a goroutine per invocation plus runtime.Goexit. |
Recovering is kind of a corner case, but I guess sooner or later people will hit it and ask for proper handling. So handling it from day one is probably the right thing to do. But we don't have to have a goroutine per test because of this, right? |
libfuzzer's generated main function uses package reflect. When attempting to build a package that doesn't depend on reflect, such as github.com/dvyukuv/go-fuzz-corpus/{bzip2,gif,url}, package reflect wasn't getting copied to GOROOT, and the build failed. Fix that. We may need something similar in the future for fuzz.F; see dvyukov#223. Updates google/oss-fuzz/#2188
libfuzzer's generated main function uses package reflect. When attempting to build a package that doesn't depend on reflect, such as github.com/dvyukuv/go-fuzz-corpus/{bzip2,gif,url}, package reflect wasn't getting copied to GOROOT, and the build failed. Fix that. We may need something similar in the future for fuzz.F; see #223. Updates google/oss-fuzz/#2188
libfuzzer's generated main function uses package reflect. When attempting to build a package that doesn't depend on reflect, such as github.com/dvyukuv/go-fuzz-corpus/{bzip2,gif,url}, package reflect wasn't getting copied to GOROOT, and the build failed. Fix that. We may need something similar in the future for fuzz.F; see dvyukov#223. Updates google/oss-fuzz/#2188
This is initial work towards #218.
DO NOT MERGE
I am sending it for discussion.
I am not entirely satisfied with this as it stands.
Though it is not ready to merge, it is my hope that this will help move along the conversation. Feedback welcome as we all ponder more.