-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: caller returns different result after we upgrade go1.11.6 to go1.12.1 #31185
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
Comments
This is a result of eliding wrapper functions in tracebacks. There's a wrapper function Upgrading your example to print all the skips:
If you look at all the locations reported for different skips, in 1.11 you get:
Notice the duplicate From the user's perspective, though, the duplicate In 1.12, you get:
Which correctly corresponds to the callsites present in the user's code. |
Thanks. This behavior change was mentioned in the release notes: https://golang.org/doc/go1.12#runtime Closing for now given that @randall77 has provided a solution for you that takes the new behavior into account. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
run this demo code on go1.11.6 and go1.12.1 will get different result.
What did you expect to see?
What did you see instead?
go1.11.6 print
go1.12.1 print
looks like if
skip
greater than 3 will get different result.The text was updated successfully, but these errors were encountered: