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: running guru on non-Go file panics #14684

Closed
dominikh opened this issue Mar 7, 2016 · 2 comments
Closed

x/tools/cmd/guru: running guru on non-Go file panics #14684

dominikh opened this issue Mar 7, 2016 · 2 comments

Comments

@dominikh
Copy link
Member

dominikh commented Mar 7, 2016

$ touch /tmp/foo        
$ guru what /tmp/foo:\#0
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x4274bb]

goroutine 1 [running]:
panic(0x81f800, 0xc820012180)
    /usr/lib/go/src/runtime/panic.go:464 +0x3e6
main.fileOffsetToPos(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/dominikh/prj/go/src/golang.org/x/tools/cmd/guru/pos.go:78 +0x4b
main.fastQueryPos(0xab2be0, 0x7fff0dd27320, 0xb, 0xc81fffc2c0, 0x0, 0x0)
    /home/dominikh/prj/go/src/golang.org/x/tools/cmd/guru/pos.go:128 +0x1fb
main.what(0xc8200ce930, 0x0, 0x0)
    /home/dominikh/prj/go/src/golang.org/x/tools/cmd/guru/what.go:28 +0x60
main.Run(0xc8200ce930, 0x0, 0x0)
    /home/dominikh/prj/go/src/golang.org/x/tools/cmd/guru/guru.go:126 +0x13f
main.main()
    /home/dominikh/prj/go/src/golang.org/x/tools/cmd/guru/main.go:204 +0x8d5

/cc @alandonovan

@gopherbot
Copy link

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

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

Fixes issue golang/go#14684

Change-Id: I56023bf36c307d02c71b4ddf08aee9c229fc66c1
Reviewed-on: https://go-review.googlesource.com/20247
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
@dominikh
Copy link
Member Author

Closing this issue manually because @gopherbot refuses to.

@golang golang locked and limited conversation to collaborators Mar 13, 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

2 participants