-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: build -buildmode=plugin -linkshared panic: slice bounds out of range #34347
Comments
go build -buildmode=plugin -linkshared
panic: slice bounds out of range
Although the failure message is different, I feel like the following comment still applies: #18671
I'm going to close this as a duplicate of #18671, but please comment if you disagree or if you feel that I misunderstood the issue. |
It works if I build everything "old style" inside a GOPATH. This panic happens only when I turn the modules on. |
@vmarkovtsev Thanks for the follow-up. I could be wrong about this for sure. /cc @ianlancetaylor who was the author of the comment I quoted about |
Yes, I think this is a different issue, and we should leave this open separately. But I also think that what I wrote earlier applies: I don't expect -buildmode=plugin -linkshared to work today. Somebody will have to investigate the problems and figure out whether they can be fixed. I don't know of anybody planning to do that. I encourage you to investigate the problem and send a fix. |
For what it's worth, this is not limited to |
Reprioritizing for Go1.14. This is a panic in cmd/go that happens when |
I'm not able to reproduce this specific failure mode. However, I have a fix for #35759, which seems closely related. |
Change https://golang.org/cl/208233 mentions this issue: |
Change https://golang.org/cl/208458 mentions this issue: |
In module mode, a non-main package lacks an install target. The location of the .shlib corresponding to a given target is stored in a .shlibname file alongside its install target, so in module mode a non-main package also lacks a .shlibname file. This also implies that such a package cannot be installed with 'go install -buildmode=linkshared', but that is a problem for another day. Fixes #35759 Updates #34347 Change-Id: Id3e0e068266d5fb9b061a59e70f9a65985d4973b Reviewed-on: https://go-review.googlesource.com/c/go/+/208233 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
@vmarkovtsev, could you try this using a If it is not fixed, please provide an exact command line (and, ideally, redacted source code) that reproduces the problem. |
…ng sys.BuildModeSupported Updates #34347 Change-Id: I6ea02d4737999bf24f5335508b5ed2352b498122 Reviewed-on: https://go-review.googlesource.com/c/go/+/208458 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
The panic was fixed, so at this point, I don't think this issue covers anything outside of #18671. Let's keep this closed as a duplicate. |
What version of Go are you using (
go version
)?Tested on:
1.11.13 linux/amd64
1.12.9 linux/amd64
1.13 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Inside TravisCI's "xenial" dist. It also reproduces on my local machine.
What did you do?
What did you expect to see?
The built
my_plug.so
.What did you see instead?
Notes
This used to work fine without go modules.
The text was updated successfully, but these errors were encountered: