From e2bde5cf9b1b4e56f1d2c8469006fb11f8a99739 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 12 Aug 2010 23:26:54 -0700 Subject: [PATCH] runtime: fix another stack split bug Makes godoc --http=:1234 not crash on linux/amd64. R=r CC=golang-dev https://golang.org/cl/1975044 --- src/pkg/runtime/proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 2abb28307e3..3dbc48fd9bc 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -547,6 +547,9 @@ gosched(void) // Record that it's not using the cpu anymore. // This is called only from the go syscall library and cgocall, // not from the low-level system calls used by the runtime. +// Entersyscall cannot split the stack: the gosave must +// make g->sched refer to the caller's stack pointer. +#pragma textflag 7 void ·entersyscall(void) {