1
0
mirror of https://github.com/golang/go synced 2024-11-14 08:50:22 -07:00
go/src/cmd/link
Austin Clements c2c07c7989 runtime: always use 2MB stacks on 64-bit Windows
Currently, Windows stacks are either 128kB or 2MB depending on whether
the binary uses cgo. This is because we assume that Go system stacks
and the small amount of C code invoked by the standard library can
operate within smaller stacks, but general Windows C code assumes
larger stacks.

However, it's easy to call into arbitrary C code using the syscall
package on Windows without ever importing cgo into a binary. Such
binaries need larger system stacks even though they don't use cgo.

Fix this on 64-bit by increasing the system stack size to 2MB always.
This only costs address space, which is free enough on 64-bit to not
worry about. We keep (for now) the existing heuristic on 32-bit, where
address space comes at more of a premium.

Updates #20975.

Change-Id: Iaaaa9a2fcbadc825cddc797aaaea8d34ef8debf2
Reviewed-on: https://go-review.googlesource.com/49331
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2017-07-18 14:35:35 +00:00
..
internal runtime: always use 2MB stacks on 64-bit Windows 2017-07-18 14:35:35 +00:00
doc.go cmd/link: don't suggest using nm to find -X name 2017-01-02 17:56:17 +00:00
dwarf_test.go cmd/link: skip TestDWARF when cgo is disabled 2017-03-30 22:32:33 +00:00
link_test.go cmd/link: handle long symbol names 2016-04-13 20:31:43 +00:00
linkbig_test.go cmd/internal/objabi: extract shared functionality from obj 2017-04-19 00:00:09 +00:00
main.go cmd/internal/objabi: extract shared functionality from obj 2017-04-19 00:00:09 +00:00