-
Notifications
You must be signed in to change notification settings - Fork 276
Closed as not planned
Labels
Description
Hi Dmitry,
Thanks for a great tool.
I have faced with the next issue trying to inspect coverage profile gathered by go-fuzz.
go tool cover -html=coverprofile
cover: inconsistent NumStmt: changed from 0 to 1
Some go env stuff
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9.2/libexec/pkg/tool/darwin_amd64"
go-fuzz rev: 490b850
Snippet of cover profile that causes the issue:
fmt/format.go:0.0,1.1 0 0
fmt/format.go:0.0,1.1 1 0
There are a lot of similar lines in the cover profile with different files as well (from std lib and from a project).
I did some investigation and found the place in go tool cover sources:
Also, I think the place in go-fuzz
that introduced that 0 statements is
go-fuzz/go-fuzz-build/cover.go
Line 223 in 720fd7c
return []ast.Stmt{f.newCounter(pos, blockEnd, 0)} |
I would like to fix that issue but do not understand where is the actual problem.
arsham, mpx, marten-seemann and elichai