Skip to content
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

cmd/go: segfault when compiling on Bash for Windows #18705

Closed
egtann opened this issue Jan 18, 2017 · 2 comments
Closed

cmd/go: segfault when compiling on Bash for Windows #18705

egtann opened this issue Jan 18, 2017 · 2 comments
Milestone

Comments

@egtann
Copy link

egtann commented Jan 18, 2017

What version of Go are you using (go version)?

go version go1.7.3 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"                                                                                                                                                  %GOPATH="/home/___/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"                                                                                                                tCC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build087440557=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

Using Bash for Windows on the latest Insider Fast Track build (15007), but this has been happening for many builds now.

What did you do?

If possible, provide a recipe for reproducing the error.

Segfault occurs when compiling the following program: https://play.golang.org/p/jpxpcTMV6-

What did you expect to see?

A list of the errors preventing the program from compiling.

What did you see instead?

[signal SIGSEGV: segmentation violation code=0x80 addr=0x48 pc=0x657d6c]
                                                                                                                                                              lgoroutine 1 [running]:
runtime.throw(0x8f3377, 0x5)
        /usr/local/go/src/runtime/panic.go:566 +0x95 fp=0xc42103a610 sp=0xc42103a5f0
runtime.sigpanic()
        /usr/local/go/src/runtime/sigpanic_unix.go:27 +0x288 fp=0xc42103a668 sp=0xc42103a610
cmd/compile/internal/gc.typecheckdef(0xc4209d55f0, 0x0)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:3712 +0x77c fp=0xc42103a7a8 sp=0xc42103a668
cmd/compile/internal/gc.typecheck1(0xc4209d55f0, 0x6, 0x4)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:266 +0xd3e0 fp=0xc42103b6b8 sp=0xc42103a7a8
cmd/compile/internal/gc.typecheck(0xc4209d55f0, 0x6, 0x0)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:188 +0x654 fp=0xc42103b7e0 sp=0xc42103b6b8
cmd/compile/internal/gc.typecheck1(0xc42065aab0, 0x4, 0x7f6cd27f8610)                                                                                         %
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:476 +0x7e45 fp=0xc42103c6f0 sp=0xc42103b7e0
cmd/compile/internal/gc.typecheck(0xc42065aab0, 0x4, 0x8)
/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:188 +0x654 fp=0xc420fcc818 sp=0xc420fcc6f0
cmd/compile/internal/gc.structfield(0xc42064abd0, 0x1)
        /usr/local/go/src/cmd/compile/internal/gc/dcl.go:750 +0x2ca fp=0xc420fcc880 sp=0xc420fcc818
cmd/compile/internal/gc.tofunargs(0xc420628648, 0x1, 0x1, 0xc4200dc702, 0xc420fb78b0)
        /usr/local/go/src/cmd/compile/internal/gc/dcl.go:845 +0xc3 fp=0xc420fcc900 sp=0xc420fcc880
cmd/compile/internal/gc.functype0(0xc420fb7810, 0x0, 0xc420628648, 0x1, 0x1, 0xc420628650, 0x1, 0x1)
        /usr/local/go/src/cmd/compile/internal/gc/dcl.go:1039 +0x1a5 fp=0xc420fcc990 sp=0xc420fcc900
cmd/compile/internal/gc.functype(0x0, 0xc420628648, 0x1, 0x1, 0xc420628650, 0x1, 0x1, 0xc42064a900)
        /usr/local/go/src/cmd/compile/internal/gc/dcl.go:1024 +0x89 fp=0xc420fcc9e8 sp=0xc420fcc990
cmd/compile/internal/gc.typecheck1(0xc42064ad80, 0x4, 0xc420fa8c01)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:466 +0xc8c8 fp=0xc420fcd8f8 sp=0xc420fcc9e8
cmd/compile/internal/gc.typecheck(0xc42064ad80, 0x4, 0xc42064a900)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:188 +0x654 fp=0xc420fcda20 sp=0xc420fcd8f8
cmd/compile/internal/gc.typecheckdef(0xc42064aea0, 0x0)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:3669 +0x65e fp=0xc420fcdb60 sp=0xc420fcda20
cmd/compile/internal/gc.typecheck1(0xc42064aea0, 0x22, 0xc4207b2ac8)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:266 +0xd3e0 fp=0xc420fcea70 sp=0xc420fcdb60
cmd/compile/internal/gc.typecheck(0xc42064aea0, 0x22, 0x0)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:188 +0x654 fp=0xc420fceb98 sp=0xc420fcea70
cmd/compile/internal/gc.typecheckfunc(0xc42064ae10)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:3368 +0x40 fp=0xc420fcebd0 sp=0xc420fceb98
cmd/compile/internal/gc.typecheck1(0xc42064ae10, 0x1, 0xc42064a990)
        /usr/local/go/src/cmd/compile/internal/gc/typecheck.go:2076 +0x643e fp=0xc420fcfae0 sp=0xc420fcebd0
/usr/local/go/src/cmd/compile/internal/gc/typecheck.go:188 +0x654 fp=0xc420fcfc08 sp=0xc420fcfae0
cmd/compile/internal/gc.Main()
        /usr/local/go/src/cmd/compile/internal/gc/main.go:367 +0x15e8 fp=0xc420fcfe50 sp=0xc420fcfc08
cmd/compile/internal/amd64.Main()
        /usr/local/go/src/cmd/compile/internal/amd64/galign.go:93 +0x2fa fp=0xc420fcfe88 sp=0xc420fcfe50
main.main()
        /usr/local/go/src/cmd/compile/main.go:33 +0x2a3 fp=0xc420fcff18 sp=0xc420fcfe88
runtime.main()
        /usr/local/go/src/runtime/proc.go:183 +0x1f4 fp=0xc420fcff70 sp=0xc420fcff18
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420fcff78 sp=0xc420fcff70
@rakyll rakyll changed the title Segfault when compiling on Bash for Windows cmd/go: segfault when compiling on Bash for Windows Jan 18, 2017
@rakyll rakyll added this to the Go1.9 milestone Jan 18, 2017
@bradfitz
Copy link
Contributor

In general, we don't make special exceptions or officially support Bash on Windows. Microsoft's intention is for their Linux system call implementation to match the behavior of Linux, so any deviation in behavior is a bug in the Linux Subsystem for Windows.

I recommend you file a bug against their bug tracker.

Our meta issue for deciding whether to support and track Go-on-WindowsLinux is #17365, so this is effectively a dup of that one.

@egtann
Copy link
Author

egtann commented Jan 18, 2017

That makes sense. I'll file a bug with Microsoft.

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

No branches or pull requests

4 participants