-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/link: "panic: index out of range" on go tip linker #22941
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
Comments
/cc @thanm |
@danderson, any chance you could reproduce both at 4435fcf and just before 4435fcf? |
I don't have a local go tip installation right now - I'll get one set up and try, though y'all may beat me to it. |
No worries. I'll try to repro locally first. |
As predicted, you beat me to it :) |
I will take a look. FWIW I've seen that assert in cases where you have a mix of Go objects (some object files bulit by previous versions of the compiler), but I'll see what I can find out. |
@thanm, such things shouldn't happen anymore with the new cmd/go content-based caching. Your change is well past the cmd/go changes. |
I've reproduce the issue. Still not 100% sure, but I think it has to do with an interaction between the new DWARF stuff and the linker's dead code pass (the one of the type symbols referred to by a DWARF abstract function appears to be mysteriously missing). If this is holding anyone up, let me know and I can disable the feature with a flag flip while I work on it. |
FWIW, it's not blocking me, I just disabled testing on go tip in my automation until it's fixed. |
Smaller reproduce: p/p.go
q/q.go
main/main.go
It seems that when compiling |
The variables in the inner scope ( |
Change https://golang.org/cl/81415 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +2708da0dc1 Thu Nov 30 17:12:32 2017 +0000 linux/amd64
Does this issue reproduce with the latest release?
No, released versions are clean.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/home/travis/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GORACE=""
GOROOT="/home/travis/.gimme/versions/go"
GOTMPDIR=""
GOTOOLDIR="/home/travis/.gimme/versions/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build924681449=/tmp/go-build -gno-record-gcc-switches"
What did you do?
My project's test automation runs compilation and testing against go tip, to find issues early in the dev cycle. Today, it crashed: https://travis-ci.org/google/metallb/jobs/309618087#L433
To reproduce:
If that doesn't cause the crash, you may need to pull the exact vendored dependencies:
What did you expect to see?
Program should compile happily (it does with 1.8 and 1.9)
What did you see instead?
The above crash.
The text was updated successfully, but these errors were encountered: