]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: update signature of reflectcall functions
authorCherry Zhang <cherryyz@google.com>
Wed, 10 Mar 2021 03:58:55 +0000 (22:58 -0500)
committerCherry Zhang <cherryyz@google.com>
Wed, 10 Mar 2021 15:23:39 +0000 (15:23 +0000)
commitbc489dd6d5e8fdb6089b41b21e2cca1151a8a691
treed03ec33d33167565ab506b38cd3a8b93086f3856
parent30c28bbf0507cba9219633192e02b68719ab8280
runtime: update signature of reflectcall functions

reflectcall tail calls runtime.call{16,32,...} functions, so they
have the same signature as reflectcall. It is important for them
to have the correct arg map, because those functions, as well as
the function being reflectcall'd, could move the stack. When that
happens, its pointer arguments, in particular regArgs, need to be
adjusted. Otherwise it will still point to the old stack, causing
memory corruption.

This only caused failures on the regabi builder because it is the
only place where internal/abi.RegArgs is not a zero-sized type.

May fix #44821.

Change-Id: Iab400ea6b60c52360d0b43a793f6bfe50ca9989b
Reviewed-on: https://go-review.googlesource.com/c/go/+/300154
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/stubs.go