From: Russ Cox Date: Fri, 13 Aug 2010 06:26:54 +0000 (-0700) Subject: runtime: fix another stack split bug X-Git-Tag: weekly.2010-08-25~62 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e2bde5cf9b1b4e56f1d2c8469006fb11f8a99739;p=gostls13.git 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 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 2abb28307e..3dbc48fd9b 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) {