From: Dmitriy Vyukov Date: Fri, 16 Aug 2013 17:04:05 +0000 (+0400) Subject: runtime: fix goroutine stack accounting X-Git-Tag: go1.2rc2~519 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=187b9c695f2c8fae14ed289f9f6364628f633490;p=gostls13.git runtime: fix goroutine stack accounting Fixes #6166. Fixes #6168. R=golang-dev, bradfitz, remyoudompheng CC=golang-dev https://golang.org/cl/12927045 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 690c1760eb..6950f4b179 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -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;