diff options
| author | Cherry Mui <cherryyz@google.com> | 2021-06-04 18:30:51 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-06-08 20:55:14 +0000 |
| commit | 83da32749ce86d7ecbe9078d524788fbecb4f39c (patch) | |
| tree | b834732c1a6757abe1da4183cb725679a543bc1a /src/runtime/heapdump.go | |
| parent | 8e5304f7298a0eef48e4796017c51b4d9aeb52b5 (diff) | |
| download | go-83da32749ce86d7ecbe9078d524788fbecb4f39c.tar.xz | |
[dev.typeparams] runtime: make deferproc take a func() argument
Previously it takes a *funcval, as it can be any function types.
Now it must be func(). Make it so.
Change-Id: I04273047b024386f55dbbd5fbda4767cbee7ac93
Reviewed-on: https://go-review.googlesource.com/c/go/+/325918
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/heapdump.go')
| -rw-r--r-- | src/runtime/heapdump.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go index 934e55f495..47e4b6b0d1 100644 --- a/src/runtime/heapdump.go +++ b/src/runtime/heapdump.go @@ -381,12 +381,13 @@ func dumpgoroutine(gp *g) { dumpint(uint64(uintptr(unsafe.Pointer(gp)))) dumpint(uint64(d.sp)) dumpint(uint64(d.pc)) - dumpint(uint64(uintptr(unsafe.Pointer(d.fn)))) - if d.fn == nil { + fn := *(**funcval)(unsafe.Pointer(&d.fn)) + dumpint(uint64(uintptr(unsafe.Pointer(fn)))) + if fn == nil { // d.fn can be nil for open-coded defers dumpint(uint64(0)) } else { - dumpint(uint64(uintptr(unsafe.Pointer(d.fn.fn)))) + dumpint(uint64(uintptr(unsafe.Pointer(fn.fn)))) } dumpint(uint64(uintptr(unsafe.Pointer(d.link)))) } |
