cmd/compile: when cmd/compile is compiled with -gcflags = "all=-N -l"
, the output binary panic on start
#54412
Labels
-gcflags = "all=-N -l"
, the output binary panic on start
#54412
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
YES
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
cd ${your go sdk root}/src/cmd/compile
go build -o main -gcflags "all=-N -l" main.go
./main
What did you expect to see?
see the help content of compile command
What did you see instead?
runtime: newstack at runtime/internal/atomic.(*Bool).Load+0x34 sp=0xc00010d700 stack=[0xc00010c000, 0xc00010e000]
morebuf={pc:0x1046d11 sp:0xc00010d708 lr:0x0}
sched={pc:0x1002354 sp:0xc00010d700 lr:0x0 ctxt:0x0}
runtime.reentersyscall(0x106e7bf, 0xc00010d768)
/Users/bytedance/project/go/src/runtime/proc.go:3696 +0xf1 fp=0xc00010d748 sp=0xc00010d708 pc=0x1046d11
runtime.entersyscall()
/Users/bytedance/project/go/src/runtime/proc.go:3729 +0x1d fp=0xc00010d768 sp=0xc00010d748 pc=0x106d15d
syscall.syscall(0x107b454?, 0x1ce59c0?, 0x1eac4f0?, 0xc0000221e0?)
/Users/bytedance/project/go/src/runtime/sys_darwin.go:22 +0x7f fp=0xc00010d7f8 sp=0xc00010d768 pc=0x106e7bf
syscall.fcntl(0x0, 0x3, 0x0)
/Users/bytedance/project/go/src/syscall/zsyscall_darwin_amd64.go:319 +0x5c fp=0xc00010d868 sp=0xc00010d7f8 pc=0x10d929c
internal/syscall/unix.IsNonblock(0x0)
/Users/bytedance/project/go/src/internal/syscall/unix/nonblocking_libc.go:15 +0x3f fp=0xc00010d8d8 sp=0xc00010d868 pc=0x11032bf
os.NewFile(0x0, {0x1d798c0, 0xa})
/Users/bytedance/project/go/src/os/file_unix.go:103 +0x4c fp=0xc00010d948 sp=0xc00010d8d8 pc=0x1118f0c
os.init()
/Users/bytedance/project/go/src/os/file.go:65 +0x1e8 fp=0xc00010d990 sp=0xc00010d948 pc=0x111ce68
runtime.doInit(0x2269c80)
/Users/bytedance/project/go/src/runtime/proc.go:6413 +0x132 fp=0xc00010dac0 sp=0xc00010d990 pc=0x104d2b2
runtime.doInit(0x22679e0)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010dbf0 sp=0xc00010dac0 pc=0x104d1f9
runtime.doInit(0x226bf60)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010dd20 sp=0xc00010dbf0 pc=0x104d1f9
runtime.doInit(0x2268b80)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010de50 sp=0xc00010dd20 pc=0x104d1f9
runtime.doInit(0x226a2c0)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010df80 sp=0xc00010de50 pc=0x104d1f9
runtime.main()
/Users/bytedance/project/go/src/runtime/proc.go:233 +0x194 fp=0xc00010dfe0 sp=0xc00010df80 pc=0x103fab4
runtime.goexit()
/Users/bytedance/project/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00010dfe8 sp=0xc00010dfe0 pc=0x1071de1
fatal error: runtime: stack split at bad time
runtime stack:
runtime.throw({0x1d90620?, 0x226e360?})
/Users/bytedance/project/go/src/runtime/panic.go:1047 +0x5d fp=0x7ffeefbff6d0 sp=0x7ffeefbff6a0 pc=0x103d33d
runtime.newstack()
/Users/bytedance/project/go/src/runtime/stack.go:995 +0xaa5 fp=0x7ffeefbff878 sp=0x7ffeefbff6d0 pc=0x1058425
runtime.morestack()
/Users/bytedance/project/go/src/runtime/asm_amd64.s:570 +0x8b fp=0x7ffeefbff880 sp=0x7ffeefbff878 pc=0x106fe2b
goroutine 1 [syscall, locked to thread]:
runtime.reentersyscall(0x106e7bf, 0xc00010d768)
/Users/bytedance/project/go/src/runtime/proc.go:3696 +0xf1 fp=0xc00010d748 sp=0xc00010d708 pc=0x1046d11
runtime.entersyscall()
/Users/bytedance/project/go/src/runtime/proc.go:3729 +0x1d fp=0xc00010d768 sp=0xc00010d748 pc=0x106d15d
syscall.syscall(0x107b454?, 0x1ce59c0?, 0x1eac4f0?, 0xc0000221e0?)
/Users/bytedance/project/go/src/runtime/sys_darwin.go:22 +0x7f fp=0xc00010d7f8 sp=0xc00010d768 pc=0x106e7bf
syscall.fcntl(0x0, 0x3, 0x0)
/Users/bytedance/project/go/src/syscall/zsyscall_darwin_amd64.go:319 +0x5c fp=0xc00010d868 sp=0xc00010d7f8 pc=0x10d929c
internal/syscall/unix.IsNonblock(0x0)
/Users/bytedance/project/go/src/internal/syscall/unix/nonblocking_libc.go:15 +0x3f fp=0xc00010d8d8 sp=0xc00010d868 pc=0x11032bf
os.NewFile(0x0, {0x1d798c0, 0xa})
/Users/bytedance/project/go/src/os/file_unix.go:103 +0x4c fp=0xc00010d948 sp=0xc00010d8d8 pc=0x1118f0c
os.init()
/Users/bytedance/project/go/src/os/file.go:65 +0x1e8 fp=0xc00010d990 sp=0xc00010d948 pc=0x111ce68
runtime.doInit(0x2269c80)
/Users/bytedance/project/go/src/runtime/proc.go:6413 +0x132 fp=0xc00010dac0 sp=0xc00010d990 pc=0x104d2b2
runtime.doInit(0x22679e0)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010dbf0 sp=0xc00010dac0 pc=0x104d1f9
runtime.doInit(0x226bf60)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010dd20 sp=0xc00010dbf0 pc=0x104d1f9
runtime.doInit(0x2268b80)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010de50 sp=0xc00010dd20 pc=0x104d1f9
runtime.doInit(0x226a2c0)
/Users/bytedance/project/go/src/runtime/proc.go:6390 +0x79 fp=0xc00010df80 sp=0xc00010de50 pc=0x104d1f9
runtime.main()
/Users/bytedance/project/go/src/runtime/proc.go:233 +0x194 fp=0xc00010dfe0 sp=0xc00010df80 pc=0x103fab4
runtime.goexit()
/Users/bytedance/project/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00010dfe8 sp=0xc00010dfe0 pc=0x1071de1
goroutine 2 [force gc (idle)]:
runtime.gopark(0x1daa9b8, 0x2317530, 0x11, 0x14, 0x1)
/Users/bytedance/project/go/src/runtime/proc.go:363 +0xfd fp=0xc000058f88 sp=0xc000058f58 pc=0x103ff3d
runtime.goparkunlock(0x0?, 0x0?, 0x0?, 0x0?)
/Users/bytedance/project/go/src/runtime/proc.go:369 +0x2a fp=0xc000058fb8 sp=0xc000058f88 pc=0x103ffca
runtime.forcegchelper()
/Users/bytedance/project/go/src/runtime/proc.go:302 +0xa5 fp=0xc000058fe0 sp=0xc000058fb8 pc=0x103fd65
runtime.goexit()
/Users/bytedance/project/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000058fe8 sp=0xc000058fe0 pc=0x1071de1
created by runtime.init.5
/Users/bytedance/project/go/src/runtime/proc.go:290 +0x25
goroutine 3 [GC sweep wait]:
runtime.gopark(0x1daa9b8, 0x2317920, 0xc, 0x14, 0x1)
/Users/bytedance/project/go/src/runtime/proc.go:363 +0xfd fp=0xc000059768 sp=0xc000059738 pc=0x103ff3d
runtime.goparkunlock(0x0?, 0x0?, 0x0?, 0x0?)
/Users/bytedance/project/go/src/runtime/proc.go:369 +0x2a fp=0xc000059798 sp=0xc000059768 pc=0x103ffca
runtime.bgsweep(0x0?)
/Users/bytedance/project/go/src/runtime/mgcsweep.go:279 +0x98 fp=0xc0000597c8 sp=0xc000059798 pc=0x1028918
runtime.gcenable.func1()
/Users/bytedance/project/go/src/runtime/mgc.go:178 +0x26 fp=0xc0000597e0 sp=0xc0000597c8 pc=0x101c886
runtime.goexit()
/Users/bytedance/project/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000597e8 sp=0xc0000597e0 pc=0x1071de1
created by runtime.gcenable
/Users/bytedance/project/go/src/runtime/mgc.go:178 +0x6b
goroutine 4 [GC scavenge wait]:
runtime.gopark(0x1daa9b8, 0x2317ec0, 0xd, 0x14, 0x2)
/Users/bytedance/project/go/src/runtime/proc.go:363 +0xfd fp=0xc000059f48 sp=0xc000059f18 pc=0x103ff3d
runtime.goparkunlock(0x1eac398?, 0x1?, 0x0?, 0x0?)
/Users/bytedance/project/go/src/runtime/proc.go:369 +0x2a fp=0xc000059f78 sp=0xc000059f48 pc=0x103ffca
runtime.(*scavengerState).park(0x2317ec0)
/Users/bytedance/project/go/src/runtime/mgcscavenge.go:389 +0x4b fp=0xc000059fa0 sp=0xc000059f78 pc=0x102658b
runtime.bgscavenge(0x0?)
/Users/bytedance/project/go/src/runtime/mgcscavenge.go:617 +0x45 fp=0xc000059fc8 sp=0xc000059fa0 pc=0x1026b65
runtime.gcenable.func2()
/Users/bytedance/project/go/src/runtime/mgc.go:179 +0x26 fp=0xc000059fe0 sp=0xc000059fc8 pc=0x101c826
runtime.goexit()
/Users/bytedance/project/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000059fe8 sp=0xc000059fe0 pc=0x1071de1
created by runtime.gcenable
/Users/bytedance/project/go/src/runtime/mgc.go:179 +0xaa
The text was updated successfully, but these errors were encountered: