]> Cypherpunks.ru repositories - gostls13.git/commit
reflect: keep pointer in aggregate-typed args live in Call
authorCherry Mui <cherryyz@google.com>
Fri, 12 Nov 2021 00:58:23 +0000 (19:58 -0500)
committerCherry Mui <cherryyz@google.com>
Fri, 12 Nov 2021 14:56:58 +0000 (14:56 +0000)
commit23adc139bf1c0c099dd075da076f5a1f3ac700d4
tree83e02a244a5ad49eb1461ec1a5d9a6a9806a54f3
parente9f0381a807d1797e0b5969a29f4a3666a73c9e3
reflect: keep pointer in aggregate-typed args live in Call

When register ABI is used, reflect.Value.Call prepares the call
arguments in a memory representation of the argument registers.
It has special handling to keep the pointers in arguments live.
Currently, this handles pointer-typed arguments. But when an
argument is an aggregate-type that contains pointers and passed
in registers, it currently doesn't keep the pointers live. Do
so in this CL.

May fix #49363.

Change-Id: Ic6a0c5fdf9375ef02f7c03fbe9345e2e98c9353d
Reviewed-on: https://go-review.googlesource.com/c/go/+/363358
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>
src/internal/abi/abi.go
src/reflect/all_test.go
src/reflect/value.go