diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-01-28 15:23:05 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2021-04-02 16:53:18 +0000 |
commit | 28c5fed5576483cc696db233d7f6fffecd2833a2 (patch) | |
tree | 00109d3e508e63bbfff7c5c73f2b54ea321c402c /src/runtime/traceback.go | |
parent | 6996bae5d1d34ea9e2ab6399f70adb402697ed94 (diff) | |
download | go-28c5fed5576483cc696db233d7f6fffecd2833a2.tar.gz go-28c5fed5576483cc696db233d7f6fffecd2833a2.zip |
reflect: add register ABI support for makeFuncStub and methodValueCall
This change finishes off functionality register ABI for the reflect
package.
Specifically, it implements a call on a MakeFunc'd value by performing
the reverse process that reflect.Value.Call does, using the same ABI
steps. It implements a call on a method value created by reflect by
translating between the method value's ABI to the method's ABI.
Tests are added for both cases.
For #40724.
Change-Id: I302820b61fc0a8f94c5525a002bc02776aef41af
Reviewed-on: https://go-review.googlesource.com/c/go/+/298670
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r-- | src/runtime/traceback.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index f8cda83098..0969af1a21 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -630,7 +630,7 @@ func getArgInfo(frame *stkframe, f funcInfo, needArgMap bool, ctxt *funcval) (ar // Figure out whether the return values are valid. // Reflect will update this value after it copies // in the return values. - retValid = *(*bool)(unsafe.Pointer(arg0 + 3*sys.PtrSize)) + retValid = *(*bool)(unsafe.Pointer(arg0 + 4*sys.PtrSize)) } if mv.fn != f.entry { print("runtime: confused by ", funcname(f), "\n") |