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