We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On Go1.2 until Go1.8, the following would return an empty string:
(*runtime.Func)(nil).Name()
But a regression on Go1.9 (0efc8b2) causes this to panic:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x43ab52] goroutine 1 [running]: main.main() /tmp/sandbox221545061/main.go:7 +0x2a
It's probably worth keeping this behavior since a number of users blindly do runtime.FuncForPC(myPtr).Name() without checking that myPtr is non-nil.
runtime.FuncForPC(myPtr).Name()
myPtr
\cc @aclements
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/47354 mentions this issue.
Sorry, something went wrong.
a776087
No branches or pull requests
On Go1.2 until Go1.8, the following would return an empty string:
But a regression on Go1.9 (0efc8b2) causes this to panic:
It's probably worth keeping this behavior since a number of users blindly do
runtime.FuncForPC(myPtr).Name()
without checking thatmyPtr
is non-nil.\cc @aclements
The text was updated successfully, but these errors were encountered: