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: gentraceback no longer skips stack frames when printing #24628
Comments
Is this a regression in a user-facing behavior, or just an internal function? (I assume that it's blocking #7181; is that the only impact?) |
Change https://golang.org/cl/37222 mentions this issue: |
I've mailed a fix for this issue, packaged in the the CL that it was blocking as per https://go-review.googlesource.com/c/go/+/37222. |
CL was reverted. |
This code has all been completely refactored as of CL 468301. Now that PC buffer filling and traceback printing are completely separate entry-points and printing doesn't take a skip count, there's no longer confusion about the skip count. (Though, joke's on me, I'm about to bring back the printing skip count. But it's much more localized now!) |
I got some time today to finish up and add a rigorous test for CL https://go-review.googlesource.com/#/c/go/+/37222 which involves printing the top and bottom n frames for easy reading in case of a massive stackoverflow.
To detect that we are printing stackframes, we have this condition
go/src/runtime/traceback.go
Line 142 in fdf3373
and in order for it to work, we need to be able to skip a bunch of frames when printing the bottom n stack frames.
However, with code that we used to skip through physical frames previously, CL https://go-review.googlesource.com/37854 aka commit ee97216 changed that behavior assuming that we'd never use
skip
unlesspcbuf != nil
. However, we actually need to skip through physical frames when printing tracebacks otherwise on trying to print top and bottom stackframes, we always end up printing the top irrespective of our skip which is a regression that silently snuck in for an entire year as it wasn't used.The code that disabled proper skipping is ee97216#diff-5a2de8a1053d4e11fbc71407a5361e93L321
/cc @davidlazar @aclements
The text was updated successfully, but these errors were encountered: