]> Cypherpunks repositories - gostls13.git/commit
runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback
authorRuss Cox <rsc@golang.org>
Fri, 12 Sep 2014 11:29:19 +0000 (07:29 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 12 Sep 2014 11:29:19 +0000 (07:29 -0400)
commitf0d44dbeaf28d157f8eba85ec9f9bffdc84ce3e0
tree60896b9b1303b7ad3eb305568cb63d5e26cac032
parent70f928698b8416efa544029cfa0f0f7178cdd51b
runtime: look up arg stackmap for makeFuncStub/methodValueStub during traceback

makeFuncStub and methodValueStub are used by reflect as
generic function implementations. Each call might have
different arguments. Extract those arguments from the
closure data instead of assuming it is the same each time.

Because the argument map is now being extracted from the
function itself, we don't need the special cases in reflect.Call
anymore, so delete those.

Fixes an occasional crash seen when stack copying does
not update makeFuncStub's arguments correctly.

Will also help make it safe to require stack maps in the
garbage collector.

Derived from CL 142000044 by khr.

LGTM=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/143890044
13 files changed:
src/reflect/all_test.go
src/reflect/asm_386.s
src/reflect/asm_amd64.s
src/reflect/asm_amd64p32.s
src/reflect/asm_arm.s
src/reflect/makefunc.go
src/reflect/type.go
src/reflect/value.go
src/runtime/malloc.h
src/runtime/mgc0.c
src/runtime/runtime.h
src/runtime/stack.c
src/runtime/traceback.go