The overflow happens only with -gcflags="-N -l" and can be reproduced with: $ go test -gcflags="-N -l" -a -run=none net runtime.cgocall: nosplit stack overflow 504 assumed on entry to runtime.cgocall 480 after runtime.cgocall uses 24 472 on entry to runtime.cgocall_errno 408 after runtime.cgocall_errno uses 64 400 on entry to runtime.exitsyscall 288 after runtime.exitsyscall uses 112 280 on entry to runtime.exitsyscallfast 152 after runtime.exitsyscallfast uses 128 144 on entry to runtime.writebarrierptr 88 after runtime.writebarrierptr uses 56 80 on entry to runtime.writebarrierptr_nostore1 24 after runtime.writebarrierptr_nostore1 uses 56 16 on entry to runtime.acquirem -24 after runtime.acquirem uses 40 Move closure creation into separate function so that frames of writebarrierptr_shadow and writebarrierptr_nostore1 are overlapped. Fixes #9721 Change-Id: I40851f0786763ee964af34814edbc3e3d73cf4e7 Reviewed-on: https://go-review.googlesource.com/3418 Reviewed-by: Russ Cox <rsc@golang.org>
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. (There is a mirror of the repository at https://github.com/golang/go.)
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Please note that we do not use pull requests.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
--
Binary Distribution Notes
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.