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: fix wrapper elision when mid-stack inlining #28640

randall77 opened this Issue Nov 7, 2018 · 2 comments


None yet
2 participants

randall77 commented Nov 7, 2018

When we print a stack trace we skip wrapper functions, as they aren't user code so they might confuse users.
We currently make the decision on whether to print a stack frame or not, based on some information about the real frame that's on the stack.
However, once mid-stack inlining is enabled, a single real frame on the stack might represent multiple logical user frames. Some of those might be wrappers, some not.

The current behavior is that if the outermost frame is a wrapper, all the user frames inlined into it are not printed (unless the wrapper function is the first in the stack trace, which is a special case).
If the outermost frame is not a wrapper, all wrapper frames inlined into it are printed.

We really need to base the print/noprint decision on logical frames, not real frames.

CL 147361 has a band-aid fix for a test that fails because of this issue.
When this issue is fixed, remove that band-aid.


This comment has been minimized.

gopherbot commented Dec 5, 2018

Change mentions this issue: cmd/compile,runtime: redo mid-stack inlining tracebacks


This comment has been minimized.

gopherbot commented Dec 10, 2018

Change mentions this issue: runtime: proper panic tracebacks with mid-stack inlining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment