Skip to content

compile error with -N -l : nosplit stack overflow #45675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cuiweixie opened this issue Apr 21, 2021 · 1 comment
Closed

compile error with -N -l : nosplit stack overflow #45675

cuiweixie opened this issue Apr 21, 2021 · 1 comment

Comments

@cuiweixie
Copy link
Contributor

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)

`

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/312216 mentions this issue: cmd/compile: fix nosplit stack overflow

@golang golang locked and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants