We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
Tried to compile the following:
package main // // Nothing to do import "C" var Init = func() { } func main() { }
Command: go build -buildmode=plugin plugin.go
go build -buildmode=plugin plugin.go
No errors.
# command-line-arguments panic: runtime error: index out of range goroutine 1 [running]: panic(0x5a2480, 0x68f500) /opt/go/src/runtime/panic.go:496 +0x1a0 cmd/link/internal/ld.(*deadcodepass).flood(0xc42006fce8) /opt/go/src/cmd/link/internal/ld/deadcode.go:289 +0xe39 cmd/link/internal/ld.deadcode(0xc4204c0000) /opt/go/src/cmd/link/internal/ld/deadcode.go:60 +0xdb cmd/link/internal/ld.Main() /opt/go/src/cmd/link/internal/ld/main.go:185 +0x802 main.main() /opt/go/src/cmd/link/main.go:55 +0x142
go version devel +2e2db7a Sat Sep 17 02:54:11 2016 +0000 linux/amd64 GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/justinn/Workspace/go" GORACE="" GOROOT="/opt/go" GOTOOLDIR="/opt/go/pkg/tool/linux_amd64" TERM="dumb" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build787786251=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" uname -sr: Linux 4.7.2-1-ARCH /usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.24, by Roland McGrath et al. gdb --version: GNU gdb (GDB) 7.11.1
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/29692 mentions this issue.
Sorry, something went wrong.
I see a similar error when trying to compile this plugin code.
package main func Bar() interface{} { return nil }
Maybe a different bug as it panics on a different line. len(s.P) is zero.
panic: runtime error: index out of range goroutine 1 [running]: panic(0x5a5f20, 0x6944e0) /home/rog/go/src/runtime/panic.go:527 +0x1a0 cmd/link/internal/ld.(*deadcodepass).flood(0xc420071ce0) /home/rog/go/src/cmd/link/internal/ld/deadcode.go:292 +0xe14 cmd/link/internal/ld.deadcode(0xc420016a90) /home/rog/go/src/cmd/link/internal/ld/deadcode.go:62 +0xdb cmd/link/internal/ld.Main() /home/rog/go/src/cmd/link/internal/ld/main.go:186 +0x81b main.main() /home/rog/go/src/cmd/link/main.go:55 +0x139
go version devel +1af769d Thu Oct 13 06:16:53 2016 +0000 linux/amd64
8eb9fda
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What did you do?
Tried to compile the following:
Command:
go build -buildmode=plugin plugin.go
What did you expect to see?
No errors.
What did you see instead?
System details
The text was updated successfully, but these errors were encountered: