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

plugin: good plugin loaded at the same time as bad plugin returns an error #32095

Open
wangzz719 opened this issue May 17, 2019 · 2 comments
Open

Comments

@wangzz719
Copy link

@wangzz719 wangzz719 commented May 17, 2019

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

$ go version
go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/wangzhizhao/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/wangzhizhao/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build948496286=/tmp/go-build -gno-record-gcc-switches"

What did you do?

First I load an .so built with go1.12,while error occur,I load another .so built with go1.12.5,still got error:plugin was built with a different version of package errors。

If I only load the .so which built with go1.12.5, It works correctly.

What did you expect to see?

If load an .so built with different verison of go,while error occur,I load another .so built with the correct version of go,no error should occur,It should work correctly。

What did you see instead?

@FiloSottile FiloSottile changed the title go plugin open with correct version of go still got different version of package errors plugin: good plugin loaded at the same time as bad plugin returns an error May 17, 2019
@FiloSottile FiloSottile added this to the Unplanned milestone May 17, 2019
@FiloSottile

This comment has been minimized.

Copy link
Member

@FiloSottile FiloSottile commented May 17, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 17, 2019

I guess that if loading the plugin fails, we could call dlclose. Seems low priority but I'd be willing to review a CL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.