-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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.tools/vet: panic: runtime error: invalid memory address or nil pointer dereference #7149
Labels
Milestone
Comments
Comment 1 by kenliz@cruzio.com: panic in go vet <package path> was caused by missing return value declaration: func (nl NodeLocCR) String() { should be func (nl NodeLocCR) String() string { function body had return statements with string value |
Confirmed, thanks for the reproduction. % go tool vet board.go panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x10 pc=0xf7a7] goroutine 16 [running]: runtime.panic(0x2531e0, 0x449879) /Users/dfc/go/src/pkg/runtime/panic.c:249 +0xba main.(*File).isStringer(0x20852c180, 0x20851d2f0, 0x0) /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:460 +0xb7 main.(*File).prepStringerReceiver(0x20852c180, 0x20851d2f0) /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:445 +0x43 main.(*File).walkFuncDecl(0x20852c180, 0x20851d2f0) /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:437 +0x7e main.(*File).Visit(0x20852c180, 0x22084c3f70, 0x20851d2f0, 0x0, 0x0) /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:374 +0x165 go/ast.Walk(0x22084c3dc8, 0x20852c180, 0x22084c3f70, 0x20851d2f0) /Users/dfc/go/src/pkg/go/ast/walk.go:52 +0x6a go/ast.walkDeclList(0x22084c3dc8, 0x20852c180, 0x208541000, 0x3b, 0x40) /Users/dfc/go/src/pkg/go/ast/walk.go:38 +0xa9 go/ast.Walk(0x22084c3dc8, 0x20852c180, 0x22084c3558, 0x208501d80) /Users/dfc/go/src/pkg/go/ast/walk.go:351 +0x2ca2 main.(*File).walkFile(0x20852c180, 0x7fff5fbffcf4, 0x8, 0x208501d80) /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:357 +0x14f main.doPackage(0x27bd30, 0x1, 0x2084bc010, 0x1, 0x1, ...) /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:256 +0xb6b main.main() /Users/dfc/src/code.google.com/p/go.tools/cmd/vet/main.go:159 +0x739 Labels changed: added release-go1.3, repo-tools. Status changed to Accepted. |
This issue was closed by revision golang/tools@ee3eeef. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by kenliz@cruzio.com:
Attachments:
The text was updated successfully, but these errors were encountered: