]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix goroutine stack accounting
authorDmitriy Vyukov <dvyukov@google.com>
Fri, 16 Aug 2013 17:04:05 +0000 (21:04 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Fri, 16 Aug 2013 17:04:05 +0000 (21:04 +0400)
Fixes #6166.
Fixes #6168.

R=golang-dev, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/12927045

src/pkg/runtime/proc.c

index 690c1760eb8fceb173ad767c1f8c7284dab82344..6950f4b179840f27f67614cf89df20c3734b6d10 100644 (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;