diff options
| author | Russ Cox <rsc@golang.org> | 2014-03-07 14:19:05 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-03-07 14:19:05 -0500 |
| commit | 02903f8395c4d62c0e07f5ed114252635b29e92f (patch) | |
| tree | 67a7dda05d9a09de7cf1dff69c7760012bd39ca9 /src/pkg/runtime/stack.h | |
| parent | 9460cf78257fd8326827f1564da5da29b3bb8089 (diff) | |
| download | go-02903f8395c4d62c0e07f5ed114252635b29e92f.tar.xz | |
runtime: fix windows/386 build
From the trace it appears that stackalloc is being
called with 0x1800 which is 6k = 4k + (StackSystem=2k).
Make StackSystem 4k too, to make stackalloc happy.
It's already 4k on windows/amd64.
TBR=khr
CC=golang-codereviews
https://golang.org/cl/72600043
Diffstat (limited to 'src/pkg/runtime/stack.h')
| -rw-r--r-- | src/pkg/runtime/stack.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/runtime/stack.h b/src/pkg/runtime/stack.h index df965e1587..f2e4e43198 100644 --- a/src/pkg/runtime/stack.h +++ b/src/pkg/runtime/stack.h @@ -57,13 +57,15 @@ enum { // to each stack below the usual guard area for OS-specific // purposes like signal handling. Used on Windows and on // Plan 9 because they do not use a separate stack. + // The new stack code requires stacks to be a power of two, + // and the default start size is 4k, so make StackSystem also 4k + // to keep the sum a power of two. StackSystem used to be + // 512*sizeof(uintptr) on Windows and 512 bytes on Plan 9. #ifdef GOOS_windows - StackSystem = 512 * sizeof(uintptr), + StackSystem = 4096, #else #ifdef GOOS_plan9 - // The size of the note handler frame varies among architectures, - // but 512 bytes should be enough for every implementation. - StackSystem = 512, + StackSystem = 4096, #else StackSystem = 0, #endif // Plan 9 |
