]> Cypherpunks repositories - gostls13.git/commit
runtime: fix callee tracking in traceback printing
authorAustin Clements <austin@google.com>
Wed, 15 Mar 2023 18:27:10 +0000 (14:27 -0400)
committerAustin Clements <austin@google.com>
Wed, 15 Mar 2023 23:53:51 +0000 (23:53 +0000)
commit5f62ba621e9f1c925912f655901d0550e4a99f39
tree92ff7f43eb8cf2271b4151e5a3d0a9e74f404724
parentbe27fcfd2bfeda927213f334811df794d6a45872
runtime: fix callee tracking in traceback printing

In CL 466099, we accidentally stopped tracking callees while unwinding
inlined frames during traceback printing. The effect is that if you
have a call stack like:

  f -> wrapper -> inlined into wrapper -> panic

when considering whether to print the frame for "wrapper", we'll think
that wrapper called panic, rather than the inlined function.

Fix this in the traceback code and add a test.

Change-Id: I30ec836cc316846ce93de94e28a650e23dca184e
Reviewed-on: https://go-review.googlesource.com/c/go/+/476579
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/stack_test.go
src/runtime/traceback.go