]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix build
authorRuss Cox <rsc@golang.org>
Thu, 28 Aug 2014 15:45:30 +0000 (11:45 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 28 Aug 2014 15:45:30 +0000 (11:45 -0400)
'range hash' makes a copy of the hash array in the stack, creating
a very large stack frame. It's just the right amount that it
uses most but not all of the total stack size. If you have a lot
of environment variables, like the builders, then this is too
much and the g0 stack runs out of space.

TBR=bradfitz
CC=golang-codereviews
https://golang.org/cl/132350043

src/pkg/runtime/iface.go

index 3180ea452434bae898d6284b9a228f90b484def6..57882fb7047304741d4e21aea13f1596992c3fa0 100644 (file)
@@ -427,7 +427,7 @@ func efacethash(e interface{}) uint32 {
 }
 
 func iterate_itabs(fn func(*itab)) {
-       for _, h := range hash {
+       for _, h := range &hash {
                for ; h != nil; h = h.link {
                        fn(h)
                }