Skip to content
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

x/tools/cmd/guru: nil dereference error #14579

Closed
maddyblue opened this issue Mar 1, 2016 · 1 comment
Closed

x/tools/cmd/guru: nil dereference error #14579

maddyblue opened this issue Mar 1, 2016 · 1 comment

Comments

@maddyblue
Copy link
Contributor

On go 1.6 linux amd64, guru at revision 8b178a9, the following code as main.go:

package main

func main() {
    F()
}

invoked by (#30 is the position after the F):

guru describe main.go:#30

panics with:

main.go:#30, exit status 2: panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x5fe56f]

goroutine 1 [running]:
panic(0x81c380, 0xc82000e120)
    /usr/local/go/src/runtime/panic.go:464 +0x3e6
golang.org/x/tools/go/types/typeutil.IntuitiveMethodSet(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /go/src/golang.org/x/tools/go/types/typeutil/ui.go:25 +0x9f
main.accessibleMethods(0x0, 0x0, 0xc820089770, 0x0, 0x0, 0x0)
    /go/src/golang.org/x/tools/cmd/guru/describe.go:797 +0x74
main.describeValue(0xc820076bc0, 0xc820086780, 0x5, 0x8, 0xc820086780, 0x0, 0x0)
    /go/src/golang.org/x/tools/cmd/guru/describe.go:335 +0x2c8
main.describe(0xc8200cca80, 0x0, 0x0)
    /go/src/golang.org/x/tools/cmd/guru/describe.go:58 +0x3e5
main.Run(0xc8200cca80, 0x0, 0x0)
    /go/src/golang.org/x/tools/cmd/guru/guru.go:118 +0x416
main.main()
    /go/src/golang.org/x/tools/cmd/guru/main.go:204 +0x8d5
@ianlancetaylor ianlancetaylor changed the title x/tools/cmd/guru x/tools/cmd/guru: nil dereference error Mar 1, 2016
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Mar 1, 2016
@gopherbot
Copy link

CL https://golang.org/cl/20100 mentions this issue.

gopherbot pushed a commit to golang/tools that referenced this issue Mar 1, 2016
+ test

Fixes issue golang/go#14579

Change-Id: I6fd56f10c170027f06917935ccbc28490d413d8a
Reviewed-on: https://go-review.googlesource.com/20100
Reviewed-by: Michael Matloob <matloob@golang.org>
@golang golang locked and limited conversation to collaborators Mar 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants