runtime: fix wrapper elision when mid-stack inlining #28640
When we print a stack trace we skip wrapper functions, as they aren't user code so they might confuse users.
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).
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.
The text was updated successfully, but these errors were encountered:
As a followon to CL 152537, modify the panic-printing traceback to also handle mid-stack inlining correctly. Also declare -fm functions (aka method functions) as wrappers, so that they get elided during traceback. This fixes part 2 of #26839. Fixes #28640 Fixes #24488 Update #26839 Change-Id: I1c535a9b87a9a1ea699621be1e6526877b696c21 Reviewed-on: https://go-review.googlesource.com/c/153477 Reviewed-by: David Chase <firstname.lastname@example.org>
Now that mid-stack inlining reports backtraces correctly, we no longer need to protect against inlining in a few critical areas. Update #19348 Update #28640 Update #34276 Change-Id: Ie68487e6482c3a9509ecf7ecbbd40fe43cee8381 Reviewed-on: https://go-review.googlesource.com/c/go/+/195818 Reviewed-by: David Chase <email@example.com>