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

runtime: dependency on AVX instruction set added in Go 1.14 on macOS #37477

Closed
japettyjohn opened this issue Feb 26, 2020 · 2 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin

Comments

@japettyjohn
Copy link

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

go version go1.14 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jamesp/Library/Caches/go-build"
GOENV="/Users/jamesp/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/u1/go"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/15/1z0sxl6971s3m1_zbp9szwkc0000gp/T/go-build113341206=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Run go with no parameters on a late 2009 iMac. Mac does not support AVX instructions until 2012 (so far as I can tell). So while the OS support is up to High Sierra, the chip won't support the new version of go due to the src/runtime/preempt_amd64.s using VZEROUPPER from the AVX instruction set. 1.14rc1 did not use it and work fine.

Also note the version and env subcommands don't work either, I had to doctor the above output from 1.14rc1.

What did you expect to see?

"Go is a tool for managing Go source code." ...

What did you see instead?

SIGILL: illegal instruction
PC=0x1066040 m=0 sigcode=1

goroutine 1 [running, locked to thread]:
runtime.asyncPreempt()
	/usr/local/go/src/runtime/preempt_amd64.s:8 fp=0xc00005ae30 sp=0xc00005ae28 pc=0x1066040
go/ast.NewIdent(0x163511b, 0x1, 0xc00011c300)
	/usr/local/go/src/go/ast/ast.go:522 fp=0xc00005ae38 sp=0xc00005ae30 pc=0x110fa60
go/doc.init()
	/usr/local/go/src/go/doc/exports.go:28 +0x1f8 fp=0xc00005ae98 sp=0xc00005ae38 pc=0x1170a68
runtime.doInit(0x1a81840)
	/usr/local/go/src/runtime/proc.go:5414 +0x8a fp=0xc00005aec8 sp=0xc00005ae98 pc=0x1043aca
runtime.doInit(0x1a834a0)
	/usr/local/go/src/runtime/proc.go:5409 +0x57 fp=0xc00005aef8 sp=0xc00005aec8 pc=0x1043a97
runtime.doInit(0x1a81140)
	/usr/local/go/src/runtime/proc.go:5409 +0x57 fp=0xc00005af28 sp=0xc00005aef8 pc=0x1043a97
runtime.doInit(0x1a828a0)
	/usr/local/go/src/runtime/proc.go:5409 +0x57 fp=0xc00005af58 sp=0xc00005af28 pc=0x1043a97
runtime.doInit(0x1a850c0)
	/usr/local/go/src/runtime/proc.go:5409 +0x57 fp=0xc00005af88 sp=0xc00005af58 pc=0x1043a97
runtime.main()
	/usr/local/go/src/runtime/proc.go:190 +0x1ce fp=0xc00005afe0 sp=0xc00005af88 pc=0x103702e
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc00005afe8 sp=0xc00005afe0 pc=0x10647d1

rax    0x163511b
rbx    0x0
rcx    0x1d12e98
rdx    0x9778
rdi    0xc00011c300
rsi    0x28
rbp    0xc00005ae88
rsp    0xc00005ae28
r8     0x9008e19
r9     0x203000
r10    0x2
r11    0x11
r12    0xf1
r13    0x0
r14    0x171acbc
r15    0x0
rip    0x1066040
rflags 0x10246
cs     0x2b
fs     0x0
gs     0x0

@dmitshur dmitshur changed the title go 1.14 for darwin introduced dependency on AVX instruction set runtime: dependency on AVX instruction set added in Go 1.14 on macOS Feb 26, 2020
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 26, 2020
@dmitshur
Copy link
Contributor

VZEROUPPER was added in CL 219131 for issue #37174.

This issue may be the same as #37459, which was recently reported and resolved.

/cc @cherrymui @randall77 @aclements

@dmitshur
Copy link
Contributor

dmitshur commented Feb 26, 2020

This does seem to be a duplicate of #37459, so I'll close it in favor of that issue. Let me know if I overlooked something.

@golang golang locked and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin
Projects
None yet
Development

No branches or pull requests

3 participants