]> Cypherpunks repositories - gostls13.git/commit
reflect: preserve ctxt across moveMakeFuncArgPtrs
authorCherry Zhang <cherryyz@google.com>
Thu, 15 Apr 2021 15:19:30 +0000 (11:19 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 16 Apr 2021 20:18:11 +0000 (20:18 +0000)
commit4fb74e055595a0009f11272432c2a5047a64507b
tree2979782d53491f321ed3d8d97c0ee466bbc44d4f
parentb6e1c336037e53ae095e84cfed4a312d8fd3ad45
reflect: preserve ctxt across moveMakeFuncArgPtrs

In makeFuncStub and methodValueCall, it stores ctxt (DX) as an
argument of moveMakeFuncArgPtrs, and assumes it does not change
by the call. This is not guaranteed, and it does happen if
-clobberdead compiler flag is used. Store it somewhere else and
reload after the call.

Change-Id: I9307e3cf94db4b38305ab35494088386dfcbaae8
Reviewed-on: https://go-review.googlesource.com/c/go/+/310409
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>
Reviewed-by: Than McIntosh <thanm@google.com>
src/reflect/asm_amd64.s