-
Notifications
You must be signed in to change notification settings - Fork 18k
GoTip: New Stack Trace Output Wrong #46708
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
Dup of #45728. See also the release notes https://tip.golang.org/doc/go1.17#compiler . This is unfortunate. Closing as a dup. Thanks. |
I read 45728. I’m not clear on the conclusion? Is it being said that stack traces will no longer be accurate displaying input values moving forward because of the ABI change and a decision needs to be made to determine if it will be fixed? |
There are complex tradeoffs here. It is possible to more accurate values, or print something like "unknown" for cases we cannot accurately determine, but the costs are extra code complexity and (a non-trivial increase of) binary size. The argument dump is best effort (e.g. gccgo never printed arguments) and mostly for debugging purpose (the hex dump isn't a user-friendly format). Given that previously it may already inaccurate (e.g. if a parameter is reassigned within the function, it may or may not get the update), I'm inclined to leave it as is for 1.17. We may improve it in the future. |
That’s fair. Thank you for the detailed response. I hope there is a way to provide this functionality again in the future. I’ve used it to effectively fix bugs. |
Thanks. Good to know that it was helpful to you. Also note that if the arguments are actually used within the function (especially, used after the panic point), it is likely to be accurate (modulo reassignment as before). It is still possible to still be inaccurate, due to bugs (argument sometimes spill to wrong location) which we intend to fix but didn't get it done in 1.17, and will hopefully be fixed in 1.18. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
NO, this is fine in 1.16
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Given this program
https://github.com/ardanlabs/gotraining/blob/master/topics/go/profiling/stack_trace/example1/example1.go
Running this program with 1.16, I get the following output.
This is great, I can see the slice, string and integer that are passed in as parameters.
Now I run this program with tip.
It seems I have different values than expected.
I expected to see the same values from 1.16 but in the new format.
Is my assumption correct or am I not reading the stack trace properly?
The text was updated successfully, but these errors were encountered: