aboutsummaryrefslogtreecommitdiff
path: root/test/nosplit.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2015-05-01 09:36:18 -0700
committerKeith Randall <khr@golang.org>2015-05-03 16:10:40 +0000
commit6f42b6166ae2c0cd775d24aa82548fb8637004b5 (patch)
treeb33d85208650a5d545bbd3bfd1117922069ba888 /test/nosplit.go
parente8057df971f3ba3586b636a413e1e85e34660373 (diff)
downloadgo-6f42b6166ae2c0cd775d24aa82548fb8637004b5.tar.gz
go-6f42b6166ae2c0cd775d24aa82548fb8637004b5.zip
test: fix nosplit test for noopt build
Noopt builds get a larger stack guard. This test must take that into account. Change-Id: I1b5cbafdbbfee8c369ae1bebd0b900524ebf0d7d Reviewed-on: https://go-review.googlesource.com/9610 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'test/nosplit.go')
-rw-r--r--test/nosplit.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/nosplit.go b/test/nosplit.go
index bd4e60bc13..bd7a8ddac3 100644
--- a/test/nosplit.go
+++ b/test/nosplit.go
@@ -292,9 +292,16 @@ TestCases:
// 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.
+ // the first stack frame to use up the extra bytes.
if i == 0 {
size += 512 - 128
+ // Noopt builds have a larger stackguard.
+ // See ../cmd/dist/buildruntime.go:stackGuardMultiplier
+ for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
+ if s == "-N" {
+ size += 640
+ }
+ }
}
if size%ptrSize == 4 {