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

Wrong line number in stack trace in this particular panic (from Go stdlib) #6585

Closed
mitchellh opened this issue Oct 14, 2013 · 1 comment
Closed

Comments

@mitchellh
Copy link

go version:
go version devel +4971493b0e14 Tue Oct 01 23:44:20 2013 -0400 darwin/amd64

the code:
https://gist.github.com/mitchellh/3883097d9d57fccbfb88

(the code actually works fine on play.golang.org, I'm not sure what changed in Go 1.2
but on 1.2 this panics)

The panic looks like this. If you look, the line number of `net.(*TCPConn).Close` is on
line 1 in dial.go. Is this working as intended? It made debugging this trickier.

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x35077]

goroutine 1 [running]:
runtime.panic(0x74e40, 0x114e19)
    /Users/mitchellh/go/src/pkg/runtime/panic.c:266 +0xb6
net.(*TCPConn).Close(0x0, 0x7b6a0, 0x117228)
    /Users/mitchellh/go/src/pkg/net/dial.go:1 +0x17
main.main()
    /tmp/test/test.go:10 +0x41
exit status 2
@davecheney
Copy link
Contributor

Comment 1:

Status changed to Duplicate.

Merged into issue #6586.

This issue was closed.
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

3 participants