-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add golang 1.14+ cmd/compile's native libfuzzer instrumentation support. #3633
Conversation
@lukasz-milewski @mdempsky - can you help to review this. Should this go in an official go module ? This just modifies https://github.com/mdempsky/go114-fuzz-build slightly and uses fuzz template from internal gen_go_fuzz, any other changes you think we should do here before we migrate projects from @dvyukov's https://github.com/dvyukov/go-fuzz |
Hey @inferno-chromium, TravisBuddy Request Identifier: 13ff54f0-7d8e-11ea-9491-7112ce4ca887 |
Slightly modified version of https://github.com/mdempsky/go114-fuzz-build also uses template from gen_go_fuzz.go
By official Go module, do you mean like a module maintained by the Go project? Or do you mean like in a separate, standalone Go module? I would think you can just use github.com/mdempsky/go114-fuzz-build as-is.
What was the motivation for these changes? |
Yes an official go module maintained by Go project.
Prefer to avoid user repo, prefer to use github.com/google, we will just put code in OSS-Fuzz repo.
Makes it easier to make minor changes, e.g. adds LLVMFuzzerInitialize, removes unneeded command line switches, makes output file mandatory. |
Hey @inferno-chromium, TravisBuddy Request Identifier: 076822d0-7db1-11ea-b89f-d9b5d34487e5 |
Does adding this have any effect if the function doesn't do anything? The |
Yes right, in future, we can add support for it. but no reason to keep it now. removed.
Ok done, switched to your version. |
Hey @inferno-chromium, TravisBuddy Request Identifier: 1c8a4e00-7db5-11ea-b89f-d9b5d34487e5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but not a fan of branching/duplicating code. Can we just clone https://github.com/mdempsky/go114-fuzz-build directly? If these changes are needed, can we just contribute them to that repo instead?
Sure, removed from our repo and will ask @lukasz-milewski to upstream in an official repo. Till then better to not duplicate stuff, so removed my implementation. |
Hey @inferno-chromium, TravisBuddy Request Identifier: b01b1ef0-7ded-11ea-a704-7741d9774a61 |
For what it's worth, I'm the upstream maintainer of the Go compiler's libfuzzer support, and I intend to maintain mdempsky/go114-fuzz-build until there's official cmd/go integration. But I expect the latter will still be a while. |
Sure that sounds good, we will follow mdempsky/go114-fuzz-build then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot!
Slightly modified version of https://github.com/mdempsky/go114-fuzz-build
also uses template from gen_go_fuzz.go