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!
echo "package main; func init() { println("hi") }" > x.go go build -buildmode=plugin x.go
My very first plugin.
# command-line-arguments panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xd8 pc=0x506b24] goroutine 1 [running]: panic(0x5b9ea0, 0x6b3ca0) /home/austin/go.dev/src/runtime/panic.go:531 +0x1cf cmd/link/internal/ld.(*deadcodepass).init(0xc420071d20) /home/austin/go.dev/src/cmd/link/internal/ld/deadcode.go:255 +0x744 cmd/link/internal/ld.deadcode(0xc4204a2000) /home/austin/go.dev/src/cmd/link/internal/ld/deadcode.go:61 +0xca cmd/link/internal/ld.Main() /home/austin/go.dev/src/cmd/link/internal/ld/main.go:186 +0x820 main.main() /home/austin/go.dev/src/cmd/link/main.go:55 +0x139
Specifically, this seems to be because there are no exported symbols in my plugin. If I add a dummy exported symbol, the linker does not crash.
go version devel +f135106 Sun Oct 30 19:14:08 2016 +0000 linux/amd64 GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/austin/r/go" GORACE="" GOROOT="/home/austin/go.dev" GOTOOLDIR="/home/austin/go.dev/pkg/tool/linux_amd64" TERM="dumb" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build901715014=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" uname -sr: Linux 4.2.0-42-generic Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty /lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.9) stable release version 2.19, by Roland McGrath et al. gdb --version: GNU gdb (GDB) 7.9-gg19
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/32437 mentions this issue.
Sorry, something went wrong.
d0e4083
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What did you do?
What did you expect to see?
My very first plugin.
What did you see instead?
Specifically, this seems to be because there are no exported symbols in my plugin. If I add a dummy exported symbol, the linker does not crash.
System details
The text was updated successfully, but these errors were encountered: