diff options
author | Russ Cox <rsc@golang.org> | 2014-10-07 23:39:00 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-07 23:39:00 -0400 |
commit | e5f51cfff0a86f886b85e4e489217d80f65c56c0 (patch) | |
tree | 18406ff0c96874d23b7846c9e2c4320335eda7b6 /src/runtime/panic.go | |
parent | 5d002841f887436edc2b238694f04caaa696cae4 (diff) | |
download | go-e5f51cfff0a86f886b85e4e489217d80f65c56c0.tar.gz |
runtime: fix windows/amd64 build
Out of stack space due to new 2-word call in freedefer.
Go back to smaller function calls.
TBR=brainman
CC=golang-codereviews
https://codereview.appspot.com/152340043
Diffstat (limited to 'src/runtime/panic.go')
-rw-r--r-- | src/runtime/panic.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go index c78102f8a..58b14b09e 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -189,8 +189,7 @@ func newdefer(siz int32) *_defer { //go:nosplit func freedefer(d *_defer) { if d._panic != nil { - // _panic must be cleared before d is unlinked from gp. - gothrow("freedefer with d._panic != nil") + freedeferpanic() } sc := deferclass(uintptr(d.siz)) if sc < uintptr(len(p{}.deferpool)) { @@ -203,6 +202,13 @@ func freedefer(d *_defer) { } } +// Separate function so that it can split stack. +// Windows otherwise runs out of stack space. +func freedeferpanic() { + // _panic must be cleared before d is unlinked from gp. + gothrow("freedefer with d._panic != nil") +} + // Run a deferred function if there is one. // The compiler inserts a call to this at the end of any // function which calls defer. |