diff --git a/src/runtime/stack.go b/src/runtime/stack.go index efaa799022..284c6b3b84 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -1328,8 +1328,7 @@ func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args if p != nil { n := *(*uintptr)(p) p = add(p, goarch.PtrSize) - r0 := (*stackObjectRecord)(noescape(p)) - objs = unsafe.Slice(r0, int(n)) + *(*slice)(unsafe.Pointer(&objs)) = slice{array: noescape(p), len: int(n), cap: int(n)} // Note: the noescape above is needed to keep // getStackMap from "leaking param content: // frame". That leak propagates up to getgcmask, then