cmd/go: go build crashes
alexbrainman opened this issue · 7 comments
alexbrainman commented
C:\Test>go version
go version devel +4fcb4eb Sat Jun 25 00:36:40 2016 +0000 windows/amd64
C:\Test>set GOARCH=386
C:\Test>type a.go
package main
import "fmt"
func main() {
fmt.Println("hello")
}
C:\Test>go build "-gcflags=-N -l" -o a.exe a.go
# command-line-arguments
runtime.cgocall: nosplit stack overflow
588 assumed on entry to runtime.cgocall (nosplit)
540 after runtime.cgocall (nosplit) uses 48
536 on entry to runtime.exitsyscall (nosplit)
360 after runtime.exitsyscall (nosplit) uses 176
356 on entry to runtime.exitsyscallfast (nosplit)
196 after runtime.exitsyscallfast (nosplit) uses 160
192 on entry to runtime.writebarrierptr (nosplit)
152 after runtime.writebarrierptr (nosplit) uses 40
148 on entry to runtime.cgoCheckWriteBarrier (nosplit)
92 after runtime.cgoCheckWriteBarrier (nosplit) uses 56
88 on entry to runtime.cgoIsGoPointer (nosplit)
64 after runtime.cgoIsGoPointer (nosplit) uses 24
60 on entry to runtime.inHeapOrStack (nosplit)
4 after runtime.inHeapOrStack (nosplit) uses 56
0 on entry to runtime.panicindex
-4 on entry to runtime.morestack (nosplit)
runtime.cgocallbackg: nosplit stack overflow
588 assumed on entry to runtime.cgocallbackg (nosplit)
540 after runtime.cgocallbackg (nosplit) uses 48
536 on entry to runtime.exitsyscall (nosplit)
360 after runtime.exitsyscall (nosplit) uses 176
356 on entry to runtime.exitsyscallfast (nosplit)
196 after runtime.exitsyscallfast (nosplit) uses 160
192 on entry to runtime.writebarrierptr (nosplit)
152 after runtime.writebarrierptr (nosplit) uses 40
148 on entry to runtime.cgoCheckWriteBarrier (nosplit)
92 after runtime.cgoCheckWriteBarrier (nosplit) uses 56
88 on entry to runtime.cgoIsGoPointer (nosplit)
64 after runtime.cgoIsGoPointer (nosplit) uses 24
60 on entry to runtime.inHeapOrStack (nosplit)
4 after runtime.inHeapOrStack (nosplit) uses 56
0 on entry to runtime.panicindex
-4 on entry to runtime.morestack (nosplit)
syscall.loadsystemlibrary: nosplit stack overflow
588 assumed on entry to syscall.loadsystemlibrary (nosplit)
508 after syscall.loadsystemlibrary (nosplit) uses 80
504 on entry to runtime.cgocall (nosplit)
456 after runtime.cgocall (nosplit) uses 48
452 on entry to runtime.entersyscall (nosplit)
436 after runtime.entersyscall (nosplit) uses 16
432 on entry to runtime.reentersyscall (nosplit)
296 after runtime.reentersyscall (nosplit) uses 136
292 on entry to runtime.casgstatus (nosplit)
108 after runtime.casgstatus (nosplit) uses 184
104 on entry to runtime.throw (nosplit)
80 after runtime.throw (nosplit) uses 24
76 on entry to runtime.dopanic (nosplit)
16 after runtime.dopanic (nosplit) uses 60
12 on entry to runtime.getcallerpc (nosplit)
8 after runtime.getcallerpc (nosplit) uses 4
4 on entry to runtime.nextBarrierPC (nosplit)
-4 after runtime.nextBarrierPC (nosplit) uses 8
syscall.loadlibrary: nosplit stack overflow
588 assumed on entry to syscall.loadlibrary (nosplit)
552 after syscall.loadlibrary (nosplit) uses 36
548 on entry to runtime.cgocall (nosplit)
500 after runtime.cgocall (nosplit) uses 48
496 on entry to runtime.entersyscall (nosplit)
480 after runtime.entersyscall (nosplit) uses 16
476 on entry to runtime.reentersyscall (nosplit)
340 after runtime.reentersyscall (nosplit) uses 136
336 on entry to runtime.casgstatus (nosplit)
152 after runtime.casgstatus (nosplit) uses 184
148 on entry to runtime.nanotime (nosplit)
128 after runtime.nanotime (nosplit) uses 20
124 on entry to runtime.systime (nosplit)
-8 after runtime.systime (nosplit) uses 132
syscall.getprocaddress: nosplit stack overflow
588 assumed on entry to syscall.getprocaddress (nosplit)
552 after syscall.getprocaddress (nosplit) uses 36
548 on entry to runtime.cgocall (nosplit)
500 after runtime.cgocall (nosplit) uses 48
496 on entry to runtime.entersyscall (nosplit)
480 after runtime.entersyscall (nosplit) uses 16
476 on entry to runtime.reentersyscall (nosplit)
340 after runtime.reentersyscall (nosplit) uses 136
336 on entry to runtime.casgstatus (nosplit)
152 after runtime.casgstatus (nosplit) uses 184
148 on entry to runtime.nanotime (nosplit)
128 after runtime.nanotime (nosplit) uses 20
124 on entry to runtime.systime (nosplit)
-8 after runtime.systime (nosplit) uses 132
syscall.Syscall: nosplit stack overflow
588 assumed on entry to syscall.Syscall (nosplit)
548 after syscall.Syscall (nosplit) uses 40
544 on entry to runtime.cgocall (nosplit)
496 after runtime.cgocall (nosplit) uses 48
492 on entry to runtime.entersyscall (nosplit)
476 after runtime.entersyscall (nosplit) uses 16
472 on entry to runtime.reentersyscall (nosplit)
336 after runtime.reentersyscall (nosplit) uses 136
332 on entry to runtime.casgstatus (nosplit)
148 after runtime.casgstatus (nosplit) uses 184
144 on entry to runtime.nanotime (nosplit)
124 after runtime.nanotime (nosplit) uses 20
120 on entry to runtime.systime (nosplit)
-12 after runtime.systime (nosplit) uses 132
syscall.Syscall6: nosplit stack overflow
588 assumed on entry to syscall.Syscall6 (nosplit)
548 after syscall.Syscall6 (nosplit) uses 40
544 on entry to runtime.cgocall (nosplit)
496 after runtime.cgocall (nosplit) uses 48
492 on entry to runtime.entersyscall (nosplit)
476 after runtime.entersyscall (nosplit) uses 16
472 on entry to runtime.reentersyscall (nosplit)
336 after runtime.reentersyscall (nosplit) uses 136
332 on entry to runtime.casgstatus (nosplit)
148 after runtime.casgstatus (nosplit) uses 184
144 on entry to runtime.nanotime (nosplit)
124 after runtime.nanotime (nosplit) uses 20
120 on entry to runtime.systime (nosplit)
-12 after runtime.systime (nosplit) uses 132
syscall.Syscall9: nosplit stack overflow
588 assumed on entry to syscall.Syscall9 (nosplit)
548 after syscall.Syscall9 (nosplit) uses 40
544 on entry to runtime.cgocall (nosplit)
496 after runtime.cgocall (nosplit) uses 48
492 on entry to runtime.entersyscall (nosplit)
476 after runtime.entersyscall (nosplit) uses 16
472 on entry to runtime.reentersyscall (nosplit)
336 after runtime.reentersyscall (nosplit) uses 136
332 on entry to runtime.casgstatus (nosplit)
148 after runtime.casgstatus (nosplit) uses 184
144 on entry to runtime.nanotime (nosplit)
124 after runtime.nanotime (nosplit) uses 20
120 on entry to runtime.systime (nosplit)
-12 after runtime.systime (nosplit) uses 132
runtime.cgocallback_gofunc: nosplit stack overflow
588 assumed on entry to runtime.cgocallback_gofunc (nosplit)
576 after runtime.cgocallback_gofunc (nosplit) uses 12
572 on entry to runtime.cgocallbackg (nosplit)
524 after runtime.cgocallbackg (nosplit) uses 48
520 on entry to runtime.exitsyscall (nosplit)
344 after runtime.exitsyscall (nosplit) uses 176
340 on entry to runtime.exitsyscallfast (nosplit)
180 after runtime.exitsyscallfast (nosplit) uses 160
176 on entry to runtime.writebarrierptr (nosplit)
136 after runtime.writebarrierptr (nosplit) uses 40
132 on entry to runtime.cgoCheckWriteBarrier (nosplit)
76 after runtime.cgoCheckWriteBarrier (nosplit) uses 56
72 on entry to runtime.cgoIsGoPointer (nosplit)
48 after runtime.cgoIsGoPointer (nosplit) uses 24
44 on entry to runtime.inHeapOrStack (nosplit)
-12 after runtime.inHeapOrStack (nosplit) uses 56
C:\Test>
alexbrainman commented
I have no idea how to debug this.
Alex
aarzilli commented
I can reproduce this cross compiling from linux amd64 to linux i386 with go 1.7beta2.
ALTree commented
This is not new, it happens with go1.6.2 too. There's an amd64 no-optimization builder, but no 368 no-optimization builder, that's probably why no one ever noticed.
ALTree commented
To make it crash on go1.6.2, remove the -l
flag, i.e. run
env GOARCH=386 go build -gcflags -N prova.go
josharian commented
Marking as go1.8 since this is not a regression. Hopefully moving 386 to SSA will fix this for free.
quentinmit commented
I'm unable to reproduce on HEAD from linux/amd64 to linux/386. Please comment if you think this is still an issue.