From 187b9c695f2c8fae14ed289f9f6364628f633490 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Fri, 16 Aug 2013 21:04:05 +0400 Subject: [PATCH] runtime: fix goroutine stack accounting Fixes #6166. Fixes #6168. R=golang-dev, bradfitz, remyoudompheng CC=golang-dev https://golang.org/cl/12927045 --- src/pkg/runtime/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.48.1