-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: loading a copy of an already loaded plugin panics #19004
Comments
cc @crawshaw |
should be
|
Thanks @vimalk78, I fixed it |
@campoy Are you still experiencing this issue? My workaround is to manually set the
|
@psykhi where can i find more info about this |
Note that -pluginpath is not part of go tool interface and could change between releases. The easier way to use it now is to put your plugins in |
@vimalk78 This isn't documented anywhere AFAIK, I just found that trick from reading the source code of plugin generation/opening. |
@psykhi Thank you! To avoid panic from
|
@tudyzhb I didn't think about that one, nice! Thanks! |
Change https://golang.org/cl/61171 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What did you do?
Given a simple plugin
hello.go
:I build it into a
.so
file and create a copy of the resulting file.Then running this program panics:
The result of the execution is:
What did you expect to see?
Either the second call to
Open
is silently ignored and no code is loaded (as it happens if I call twiceOpen
with the same path) orOpen
returns an error.What did you see instead?
A panic.
Does this issue reproduce with the latest release (go1.7.5)?
Only on Go 1.8 (plugin is required)
System details
The text was updated successfully, but these errors were encountered: