diff options
| author | Keith Randall <khr@golang.org> | 2015-04-30 16:57:23 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2015-05-01 15:41:55 +0000 |
| commit | a55b131393bfc2b0107806edd22c4dd704d96197 (patch) | |
| tree | 32dc80e8b6a1750615bc5d65870d16139b5ce5cc /src/runtime | |
| parent | 7fbb1b36c37ac49db78042adc7533fb4ab83a4bc (diff) | |
| download | go-a55b131393bfc2b0107806edd22c4dd704d96197.tar.xz | |
cmd/dist, runtime: Make stack guard larger for non-optimized builds
Kind of a hack, but makes the non-optimized builds pass.
Fixes #10079
Change-Id: I26f41c546867f8f3f16d953dc043e784768f2aff
Reviewed-on: https://go-review.googlesource.com/9552
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/proc1.go | 4 | ||||
| -rw-r--r-- | src/runtime/stack2.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/proc1.go b/src/runtime/proc1.go index 8b87f818d3..1c81b1252a 100644 --- a/src/runtime/proc1.go +++ b/src/runtime/proc1.go @@ -691,7 +691,7 @@ func mstart() { // Cgo may have left stack size in stack.hi. size := _g_.stack.hi if size == 0 { - size = 8192 + size = 8192 * stackGuardMultiplier } _g_.stack.hi = uintptr(noescape(unsafe.Pointer(&size))) _g_.stack.lo = _g_.stack.hi - size + 1024 @@ -890,7 +890,7 @@ func allocm(_p_ *p, fn func()) *m { if iscgo || GOOS == "solaris" || GOOS == "windows" || GOOS == "plan9" { mp.g0 = malg(-1) } else { - mp.g0 = malg(8192) + mp.g0 = malg(8192 * stackGuardMultiplier) } mp.g0.m = mp diff --git a/src/runtime/stack2.go b/src/runtime/stack2.go index 07a7d38f0c..5ec8d8d060 100644 --- a/src/runtime/stack2.go +++ b/src/runtime/stack2.go @@ -84,7 +84,7 @@ const ( // The stack guard is a pointer this many bytes above the // bottom of the stack. - _StackGuard = 640 + _StackSystem + _StackGuard = 640*stackGuardMultiplier + _StackSystem // After a stack split check the SP is allowed to be this // many bytes below the stack guard. This saves an instruction |
