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
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@wangzz719
Copy link

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 the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 17, 2019
@FiloSottile FiloSottile added this to the Unplanned milestone May 17, 2019
@FiloSottile
Copy link
Contributor

/cc @ianlancetaylor

@ianlancetaylor
Copy link
Contributor

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

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants