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

runtime: traceback is not complete #13758

Closed
alexbrainman opened this issue Dec 29, 2015 · 3 comments
Closed

runtime: traceback is not complete #13758

alexbrainman opened this issue Dec 29, 2015 · 3 comments

Comments

@alexbrainman
Copy link
Member

Running this:

# go version
go version devel +5464181 Tue Dec 22 23:26:12 2015 +0000 linux/386
# cat a.go
package main

var g = 10

func mkslice() []byte {
        return make([]byte, g, 0)
}

func main() {
        mkslice()
}
# go run a.go
panic: runtime error: makeslice: cap out of range

goroutine 1 [running]:
main.main()
        /root/src/tcpproxy/a.go:10 +0x4e
exit status 2
#

I expect my mkslice function to be mentioned somewhere in panic output, but no such thing.

Alex

@dominikh
Copy link
Member

This is #10152

@randall77
Copy link
Contributor

mkslice is inlined, so it doesn't appear in the traceback.
See also #11432 and references.

@alexbrainman
Copy link
Member Author

Glad to know I am not the only one! Thank you.

Alex

@golang golang locked and limited conversation to collaborators Dec 29, 2016
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