From c676b8b27b128e6369da7c3a3f2bbf52bde945c8 Mon Sep 17 00:00:00 2001 From: Carl Shapiro Date: Thu, 28 Mar 2013 14:36:23 -0700 Subject: cmd/ld, runtime: restrict stack root scan to locals and arguments Updates #5134 R=golang-dev, bradfitz, cshapiro, daniel.morsing, ality, iant CC=golang-dev https://golang.org/cl/8022044 --- src/pkg/runtime/runtime.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/runtime.h') diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 638acd4740..11e713a2bc 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -147,7 +147,12 @@ enum // Global <-> per-M stack segment cache transfer batch size. StackCacheBatch = 16, }; - +enum +{ + // This value is generated by the linker and should be kept in + // sync with cmd/ld/lib.h + ArgsSizeUnknown = 0x80000000, +}; /* * structures */ @@ -775,7 +780,7 @@ void runtime·exitsyscall(void); G* runtime·newproc1(FuncVal*, byte*, int32, int32, void*); bool runtime·sigsend(int32 sig); int32 runtime·callers(int32, uintptr*, int32); -int32 runtime·gentraceback(byte*, byte*, byte*, G*, int32, uintptr*, int32); +int32 runtime·gentraceback(byte*, byte*, byte*, G*, int32, uintptr*, int32, void (*)(Func*, byte*, byte*, void*), void*); int64 runtime·nanotime(void); void runtime·dopanic(int32); void runtime·startpanic(void); -- cgit v1.3-5-g9baa