go/src/reflect
Cherry Zhang 5f45a3337e reflect: align first argument in callMethod
When calling a function obtained from reflect.Value.Method (or
MethodByName), we copy the arguments from the caller frame, which
does not include the receiver, to a new frame to call the actual
method, which does include the receiver. Here we need to align
the first (non-receiver) argument. As the receiver is pointer
sized, it is generally naturally aligned, except on amd64p32,
where the argument can have larger alignment, and this aligning
becomes necessary.

Fixes #33628.

Change-Id: I5bea0e20173f06d1602c5666d4f334e3d0de5c1e
Reviewed-on: https://go-review.googlesource.com/c/go/+/190297
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2019-08-14 19:49:15 +00:00
..
all_test.go reflect: align first argument in callMethod 2019-08-14 19:49:15 +00:00
asm_386.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_amd64.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_amd64p32.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_arm.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_arm64.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_mips64x.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_mipsx.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_ppc64x.s reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
asm_s390x.s reflect: fix s390x reflect method calls 2018-09-30 20:30:55 +00:00
asm_wasm.s all: rename WebAssembly instructions according to spec changes 2019-03-03 21:10:01 +00:00
deepequal.go reflect: reuse values during comparison of maps in DeepEqual 2018-05-31 15:18:53 +00:00
example_test.go reflect: add an example for Kind 2018-10-03 22:38:53 +00:00
export_test.go runtime: remove kindNoPointers 2019-03-25 20:46:35 +00:00
makefunc.go reflect: ensure correct scanning of return values 2018-09-29 20:25:24 +00:00
set_test.go reflect: define MyBuffer more locally in TestImplicitMapConversion 2018-04-18 12:47:39 +00:00
swapper.go runtime: remove kindNoPointers 2019-03-25 20:46:35 +00:00
tostring_test.go
type.go reflect: document that method sets are lexicographically sorted 2019-04-03 19:00:48 +00:00
value.go reflect: align first argument in callMethod 2019-08-14 19:49:15 +00:00