Description
What version of Go are you using (go version
)?
$ go version go version devel go1.17-381252f312 Wed Apr 21 13:27:17 2021 +0000 windows/amd64
Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\cuiweixie\AppData\Local\go-build
set GOENV=C:\Users\cuiweixie\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\code\go\gopath\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\code\go\gopath
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\code\go\src\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\code\go\src\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.17-381252f312 Wed Apr 21 13:27:17 2021 +0000
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=D:\code\go\src\go\src\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\CUIWEI~1\AppData\Local\Temp\go-build1006093855=/tmp/go-build -gno-record-gcc-switches
What did you do?
CGO_ENABLED=0 go build -v -gcflags "all=-N -l" .
https://play.golang.org/p/dw2YUavaGwL
What did you expect to see?
success
What did you see instead?
failed
`
$ CGO_ENABLED=0 go build -v -gcflags "all=-N -l" .
github.com/cuiweixie/go_compiler/code/basic/demo1
runtime.abort: nosplit stack overflow
792 assumed on entry to runtime.callbackasm1<0> (nosplit)
560 after runtime.callbackasm1<0> (nosplit) uses 232
552 on entry to runtime.cgocallback<0> (nosplit)
520 after runtime.cgocallback<0> (nosplit) uses 32
512 on entry to runtime.cgocallbackg<0> (nosplit)
480 after runtime.cgocallbackg<0> (nosplit) uses 32
472 on entry to runtime.cgocallbackg<1> (nosplit)
344 after runtime.cgocallbackg<1> (nosplit) uses 128
336 on entry to runtime.reentersyscall<1> (nosplit)
264 after runtime.reentersyscall<1> (nosplit) uses 72
256 on entry to runtime.casgstatus<1> (nosplit)
184 after runtime.casgstatus<1> (nosplit) uses 72
176 on entry to runtime.nanotime<1> (nosplit)
160 after runtime.nanotime<1> (nosplit) uses 16
152 on entry to runtime.nanotime1<0> (nosplit)
144 on entry to runtime.nanotimeQPC<1> (nosplit)
104 after runtime.nanotimeQPC<1> (nosplit) uses 40
96 on entry to runtime.stdcall1<0> (nosplit)
72 after runtime.stdcall1<0> (nosplit) uses 24
64 on entry to runtime.stdcall<1> (nosplit)
16 after runtime.stdcall<1> (nosplit) uses 48
8 on entry to runtime.asmcgocall<0> (nosplit)
0 on entry to gosave_systemstack_switch<13> (nosplit)
-8 on entry to runtime.abort<0> (nosplit)
gosave_systemstack_switch: nosplit stack overflow
792 assumed on entry to runtime.callbackasm<1> (nosplit)
784 on entry to runtime.callbackasm1<0> (nosplit)
552 after runtime.callbackasm1<0> (nosplit) uses 232
544 on entry to runtime.cgocallback<0> (nosplit)
512 after runtime.cgocallback<0> (nosplit) uses 32
504 on entry to runtime.cgocallbackg<0> (nosplit)
472 after runtime.cgocallbackg<0> (nosplit) uses 32
464 on entry to runtime.cgocallbackg<1> (nosplit)
336 after runtime.cgocallbackg<1> (nosplit) uses 128
328 on entry to runtime.reentersyscall<1> (nosplit)
256 after runtime.reentersyscall<1> (nosplit) uses 72
248 on entry to runtime.casgstatus<1> (nosplit)
176 after runtime.casgstatus<1> (nosplit) uses 72
168 on entry to runtime.nanotime<1> (nosplit)
152 after runtime.nanotime<1> (nosplit) uses 16
144 on entry to runtime.nanotime1<0> (nosplit)
136 on entry to runtime.nanotimeQPC<1> (nosplit)
96 after runtime.nanotimeQPC<1> (nosplit) uses 40
88 on entry to runtime.stdcall1<0> (nosplit)
64 after runtime.stdcall1<0> (nosplit) uses 24
56 on entry to runtime.stdcall<1> (nosplit)
8 after runtime.stdcall<1> (nosplit) uses 48
0 on entry to runtime.asmcgocall<0> (nosplit)
-8 on entry to gosave_systemstack_switch<13> (nosplit)
`