aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime.h
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-12 07:29:19 -0400
committerRuss Cox <rsc@golang.org>2014-09-12 07:29:19 -0400
commitf0d44dbeaf28d157f8eba85ec9f9bffdc84ce3e0 (patch)
tree60896b9b1303b7ad3eb305568cb63d5e26cac032 /src/runtime/runtime.h
parent70f928698b8416efa544029cfa0f0f7178cdd51b (diff)
downloadgo-f0d44dbeaf28d157f8eba85ec9f9bffdc84ce3e0.tar.xz
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
Diffstat (limited to 'src/runtime/runtime.h')
-rw-r--r--src/runtime/runtime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index 01923c61e0..6300b83c97 100644
--- a/src/runtime/runtime.h
+++ b/src/runtime/runtime.h
@@ -666,6 +666,7 @@ struct Panic
* stack traces
*/
typedef struct Stkframe Stkframe;
+typedef struct BitVector BitVector;
struct Stkframe
{
Func* fn; // function being run
@@ -677,6 +678,7 @@ struct Stkframe
uintptr varp; // top of local variables
uintptr argp; // pointer to function arguments
uintptr arglen; // number of bytes at argp
+ BitVector* argmap; // force use of this argmap
};
intgo runtime·gentraceback(uintptr, uintptr, uintptr, G*, intgo, uintptr*, intgo, bool(**)(Stkframe*, void*), void*, bool);