1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:44:41 -07:00

runtime: fix goroutine stack accounting

Fixes #6166.
Fixes #6168.

R=golang-dev, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/12927045
This commit is contained in:
Dmitriy Vyukov 2013-08-16 21:04:05 +04:00
parent 29794b77dd
commit 187b9c695f

View File

@ -1676,7 +1676,7 @@ runtime·malg(int32 stacksize)
stk = g->param;
g->param = nil;
}
g->stacksize = StackSystem + stacksize;
newg->stacksize = StackSystem + stacksize;
newg->stack0 = (uintptr)stk;
newg->stackguard = (uintptr)stk + StackGuard;
newg->stackguard0 = newg->stackguard;