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/compile: invalid instruction with ssa backend #16733

Closed
avdva opened this issue Aug 16, 2016 · 4 comments
Closed

cmd/compile: invalid instruction with ssa backend #16733

avdva opened this issue Aug 16, 2016 · 4 comments

Comments

@avdva
Copy link
Contributor

avdva commented Aug 16, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version devel +1e94d79 Tue Aug 16 10:41:53 2016 +0000 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/avd/dev/godev"
GORACE=""
GOROOT="/home/avd/dev/go"
GOTOOLDIR="/home/avd/dev/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build203275851=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
    go get github.com/prometheus/common/model
  2. What did you expect to see?
    go get downloaded and compiled the package
  3. What did you see instead?
../../../../../../../github.com/prometheus/common/model/value.go:404: invalid instruction: 00651 (/home/avd/dev/godev/src/github.com/prometheus/common/model/time.go:189) IMULQ   $60000000000, AX
../../../../../../../github.com/prometheus/common/model/value.go:404: invalid instruction: 00763 (/home/avd/dev/godev/src/github.com/prometheus/common/model/time.go:187) IMULQ   $3600000000000, AX
../../../../../../../github.com/prometheus/common/model/value.go:404: invalid instruction: 00838 (/home/avd/dev/godev/src/github.com/prometheus/common/model/time.go:185) IMULQ   $86400000000000, AX
../../../../../../../github.com/prometheus/common/model/value.go:404: invalid instruction: 01166 (/home/avd/dev/godev/src/github.com/prometheus/common/model/time.go:183) IMULQ   $604800000000000, AX

go get -u -gcflags="-ssa=0" github.com/prometheus/common/model works good.
Also, if I get the repo with git clone, and then compile with go build -gcflags="-ssa=0", everything works fine.

@bradfitz bradfitz added this to the Go1.7.1 milestone Aug 16, 2016
@bradfitz bradfitz changed the title cmd/build: invalid instruction with ssa backend cmd/compile: invalid instruction with ssa backend Aug 16, 2016
@bradfitz
Copy link
Contributor

/cc @cherrymui @dr2chase

tgraf added a commit to cilium/cilium that referenced this issue Aug 16, 2016
Until golang/go#16733 is fixed

Signed-off-by: Thomas Graf <thomas@cilium.io>
@randall77
Copy link
Contributor

Fix has been submitted, will go out with an eventual 1.7.1. You can work around this for now by putting one of the constants you're multiplying by in a global variable.

@bradfitz
Copy link
Contributor

bradfitz commented Sep 7, 2016

Looks like I misapplied the Go 1.7.1 milestone. This doesn't appear to affect Go 1.7 at all.

It was introduced only after 1.7 in f0bab31 I think. (@josharian, @randall77?)

@bradfitz bradfitz removed this from the Go1.7.1 milestone Sep 7, 2016
@josharian
Copy link
Contributor

Yes, that's the commit. The troublesome line was even discussed in the review. It was on the dev.ssa branch, so shouldn't be in 1.7, so no need for 1.7.1 milestone.

@golang golang locked and limited conversation to collaborators Sep 7, 2017
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

5 participants