diff options
author | Russ Cox <rsc@golang.org> | 2014-08-27 14:08:26 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-08-27 14:08:26 -0400 |
commit | af750882d3738dd977ad6731cba1f5e7f6b845cf (patch) | |
tree | 2c094ceac8495d23f8a80efe88d9151b84378322 /test | |
parent | 03f66fa3b459f88e76aa8b5f98141fbf61e06b6d (diff) | |
download | go-af750882d3738dd977ad6731cba1f5e7f6b845cf.tar.gz |
runtime: give nosplit functions 32 more bytes of headroom
The Go calling convention uses more stack space than C.
On 64-bit systems we've been right up against the limit
(128 bytes, so only 16 words) and doing awful things to
our source code to work around it. Instead of continuing
to do awful things, raise the limit to 160 bytes.
I am prepared to raise the limit to 192 bytes if necessary,
but I think this will be enough.
Should fix current link-time stack overflow errors on
- nacl/arm
- netbsd/amd64
- openbsd/amd64
- solaris/amd64
- windows/amd64
TBR=r
CC=golang-codereviews, iant
https://codereview.appspot.com/131450043
Diffstat (limited to 'test')
-rw-r--r-- | test/nosplit.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/nosplit.go b/test/nosplit.go index 35aa51017..39bb3fcb4 100644 --- a/test/nosplit.go +++ b/test/nosplit.go @@ -242,7 +242,7 @@ TestCases: if line == "" { continue } - for _, subline := range strings.Split(line, ";") { + for i, subline := range strings.Split(line, ";") { subline = strings.TrimSpace(subline) if subline == "" { continue @@ -255,6 +255,14 @@ TestCases: } name := m[1] size, _ := strconv.Atoi(m[2]) + + // CL 131450043 raised the limit from 128 to 160. + // Instead of rewriting the test cases above, adjust + // the first stack frame to use up the extra 32 bytes. + if i == 0 { + size += 32 + } + if goarch == "amd64" && size%8 == 4 { continue TestCases } |