You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It reproduces as far back as 1.12 (and probably further) and on tip.
What did you do?
If a function that should be displayed in tracebacks get inlined into a function that's elided from tracebacks, then neither of them appear. Here's a synthetic example: https://play.golang.org/p/fkGOZCT5h2W
As of CL 258938 (which is after 1.15), this happens in practice in cgo code. Exported Go functions (and functions they call) can now be inlined into the generated _cgoexp_HASH_FN function. The runtime elides _cgoexp_HASH_FN from tracebacks because it doesn't contain a ".". Because of this bug, that means it also elides anything that was inlined into it. (This is why I'm marking this as a release-blocker.)
What did you expect to see?
tracebackNotExcluded should appear in the traceback.
What did you see instead?
It does not.
This happens because gentraceback's inlined function trace printer passes the _func of the outermost function to showframe. It uses the name of that _func to make decisions about whether the frame should be shown, rather than the name of the inlined function about to be printed.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?It reproduces as far back as 1.12 (and probably further) and on tip.
What did you do?
If a function that should be displayed in tracebacks get inlined into a function that's elided from tracebacks, then neither of them appear. Here's a synthetic example: https://play.golang.org/p/fkGOZCT5h2W
As of CL 258938 (which is after 1.15), this happens in practice in cgo code. Exported Go functions (and functions they call) can now be inlined into the generated
_cgoexp_HASH_FN
function. The runtime elides_cgoexp_HASH_FN
from tracebacks because it doesn't contain a ".". Because of this bug, that means it also elides anything that was inlined into it. (This is why I'm marking this as a release-blocker.)What did you expect to see?
tracebackNotExcluded
should appear in the traceback.What did you see instead?
It does not.
This happens because
gentraceback
's inlined function trace printer passes the_func
of the outermost function toshowframe
. It uses the name of that_func
to make decisions about whether the frame should be shown, rather than the name of the inlined function about to be printed.The text was updated successfully, but these errors were encountered: