Open
Description
Go-fuzz (https://github.com/dvyukov/go-fuzz) is quite successful at finding bugs in Go code and reasonably widely used in Go community. However there are several problems with the current go-fuzz implementation that hinder wider adoption (in particular internal adoption at Google):
- go-fuzz mimics go tool build logic, which leads to constant breakages.
- go-fuzz-build does not handle cgo, and it is hard to implement.
- coverage instrumentation is source-to-source, which makes it very difficult to integrate with other build systems.
- source-to-source transformation can't handle all cases and has limited transformation capabilities (e.g. instrumenting && is tough). Some code patterns can be mishandled or lead to build failures.
- source-to-source transformation produces slow code (lots of closures).
Ideally we have coverage instrumentation in compiler, and corresponding support in go tool. Something similar to -race flag, which triggers compiler instrumentation and adds race build tag.