]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.garbage] runtime: raise StackGuard limit for Windows (again)
authorRuss Cox <rsc@golang.org>
Sat, 6 Dec 2014 00:50:09 +0000 (19:50 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 6 Dec 2014 00:50:09 +0000 (19:50 -0500)
640 bytes ought to be enough for anybody.

We'll bring this back down before Go 1.5. That's issue 9214.

TBR=rlh
CC=golang-codereviews
https://golang.org/cl/188730043

src/runtime/stack.h
src/runtime/stack2.go
test/nosplit.go

index 0099d05c23a19a5359b71f389472f7af4aeab33a..0b2cd56a9230d60247b94d33ef81bf21c2c0ae90 100644 (file)
@@ -17,7 +17,7 @@ enum {
 #endif // Windows
 
        StackBig = 4096,
-       StackGuard = 512 + StackSystem,
+       StackGuard = 640 + StackSystem,
        StackSmall = 128,
        StackLimit = StackGuard - StackSystem - StackSmall,
 };
index e50b32c784ab655781be39cceb72d213e4181917..8a78b1ad966cec6df683424748e855dbd64c4ed5 100644 (file)
@@ -84,7 +84,7 @@ const (
 
        // The stack guard is a pointer this many bytes above the
        // bottom of the stack.
-       _StackGuard = 512 + _StackSystem
+       _StackGuard = 640 + _StackSystem
 
        // After a stack split check the SP is allowed to be this
        // many bytes below the stack guard.  This saves an instruction
index 3a63e8731d92ba14c777032484804499bca5ea86..799f2c533a3e2b4032250a3d4f44ec6824118387 100644 (file)
@@ -268,11 +268,11 @@ TestCases:
                                name := m[1]
                                size, _ := strconv.Atoi(m[2])
 
-                               // The limit was originally 128 but is now 384.
+                               // The limit was originally 128 but is now 512.
                                // Instead of rewriting the test cases above, adjust
                                // the first stack frame to use up the extra 32 bytes.
                                if i == 0 {
-                                       size += 384 - 128
+                                       size += 512 - 128
                                }
 
                                if size%ptrSize == 4 {