]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix another stack split bug
authorRuss Cox <rsc@golang.org>
Fri, 13 Aug 2010 06:26:54 +0000 (23:26 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 13 Aug 2010 06:26:54 +0000 (23:26 -0700)
Makes godoc --http=:1234 not crash on linux/amd64.

R=r
CC=golang-dev
https://golang.org/cl/1975044

src/pkg/runtime/proc.c

index 2abb28307e317464cdb8c0e286b78b838a98d574..3dbc48fd9bcd0eee91bae869b7fd0b2038630b93 100644 (file)
@@ -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)
 {