]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] reflect: keep pointer in aggregate-typed args live in Call
authorKeith Randall <khr@golang.org>
Fri, 12 Nov 2021 00:58:23 +0000 (19:58 -0500)
committerDmitri Shuralyov <dmitshur@golang.org>
Tue, 21 Dec 2021 22:57:03 +0000 (22:57 +0000)
commit0aa7f8fd4d9eaf355fe05c337ec5adedd5a0da62
tree09f0d76424bd6874eb7145d48448728cab13ce40
parent4223f6eb238bf825469bbbc2444af6681a38b42b
[release-branch.go1.17] 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.

Fixes #49961

Change-Id: I9264a8767e2a2c48573f6047144759b845dcf480
Reviewed-on: https://go-review.googlesource.com/c/go/+/369098
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/internal/abi/abi.go
src/reflect/all_test.go
src/reflect/value.go