From a83748596c009db47bcd35a69531e485e2c7f924 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 17 Jul 2013 12:47:18 -0400 Subject: runtime: use new frame argument size information With this CL, I believe the runtime always knows the frame size during the gc walk. There is no fallback to "assume entire stack frame of caller" anymore. R=golang-dev, khr, cshapiro, dvyukov CC=golang-dev https://golang.org/cl/11374044 --- src/pkg/runtime/panic.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/pkg/runtime/panic.c') diff --git a/src/pkg/runtime/panic.c b/src/pkg/runtime/panic.c index 8d7d261faf..120f7706e7 100644 --- a/src/pkg/runtime/panic.c +++ b/src/pkg/runtime/panic.c @@ -156,9 +156,14 @@ runtimeĀ·deferproc(int32 siz, FuncVal *fn, ...) // is called again and again until there are no more deferred functions. // Cannot split the stack because we reuse the caller's frame to // call the deferred function. +// +// The ... in the prototype keeps the compiler from declaring +// an argument frame size. deferreturn is a very special function, +// and if the runtime ever asks for its frame size, that means +// the traceback routines are probably broken. #pragma textflag 7 void -runtimeĀ·deferreturn(uintptr arg0) +runtimeĀ·deferreturn(uintptr arg0, ...) { Defer *d; byte *argp; -- cgit v1.3-5-g9baa