]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/nosplit.go
[dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranch
[gostls13.git] / test / nosplit.go
index 3c4ae1079dc40e79ab468c7eb6bbc57f53e82d26..b49a7ce8e545aee2b36e2214aed5aaafc48713fc 100644 (file)
@@ -9,6 +9,7 @@ package main
 
 import (
        "bytes"
+       "cmd/internal/obj"
        "fmt"
        "io/ioutil"
        "log"
@@ -302,12 +303,13 @@ TestCases:
                                // Instead of rewriting the test cases above, adjust
                                // the first stack frame to use up the extra bytes.
                                if i == 0 {
-                                       size += 592 - 128
+                                       size += (obj.StackGuard - 128) - 128
                                        // Noopt builds have a larger stackguard.
-                                       // See ../cmd/dist/buildruntime.go:stackGuardMultiplier
+                                       // See ../src/cmd/dist/buildruntime.go:stackGuardMultiplier
+                                       // This increase is included in obj.StackGuard
                                        for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
                                                if s == "-N" {
-                                                       size += 720
+                                                       size += obj.StackGuard
                                                }
                                        }
                                }