mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: fix dumpgoroutine() to deal with open-coded defers
_defer.fn can be nil, so we need to add a check when dumping _defer.fn.fn. Fixes #35172 Change-Id: Ic1138be5ec9dce915a87467cfa51ff83acc6e3a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/203697 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
22d377077c
commit
1f3339f441
2 changed files with 10 additions and 5 deletions
|
|
@ -824,10 +824,10 @@ type _defer struct {
|
|||
// defers. We have only one defer record for the entire frame (which may
|
||||
// currently have 0, 1, or more defers active).
|
||||
openDefer bool
|
||||
sp uintptr // sp at time of defer
|
||||
pc uintptr // pc at time of defer
|
||||
fn *funcval
|
||||
_panic *_panic // panic that is running defer
|
||||
sp uintptr // sp at time of defer
|
||||
pc uintptr // pc at time of defer
|
||||
fn *funcval // can be nil for open-coded defers
|
||||
_panic *_panic // panic that is running defer
|
||||
link *_defer
|
||||
|
||||
// If openDefer is true, the fields below record values about the stack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue