-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/compile: nil pointer dereference for receivers has wrong line number #16462
Comments
This is a duplicate of #10152 and caused by inlining. |
What happens if you disable inlining? -gcflags=-N On Fri, 22 Jul 2016, 10:24 David Howden [email protected] wrote:
|
@davecheney Still incorrect with inlining disabled.
|
|
Yeah, sorry. Just seen that too. With inlining disabled it shows the correct position.
|
My mistake, I thought -N was a superset of -l. Show's how much I've used On Fri, Jul 22, 2016 at 2:41 PM, Dominik Honnef [email protected]
|
Closing as dupe of #10152, please comment if you think it's not. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.6.3 darwin/amd64
go env
)?GOARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
https://play.golang.org/p/qNwU6hT1YS
Force nil-pointer dereference on receiver in method. The nil-dereference is reported as happening on the method call - line 25 - rather than on the actual deference which is inside the method (line 12).
0
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0xffffffff addr=0x0 pc=0x20146]
goroutine 1 [running]:
panic(0x13f4a0, 0x1040a038)
/usr/local/go/src/runtime/panic.go:481 +0x700
main.main()
/tmp/sandbox599323765/main.go:12 +0xe6
0
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0xffffffff addr=0x0 pc=0x20146]
goroutine 1 [running]:
panic(0x13f4a0, 0x1040a038)
/usr/local/go/src/runtime/panic.go:481 +0x700
main.main()
/tmp/sandbox599323765/main.go:25 +0xe6
The text was updated successfully, but these errors were encountered: