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
x/tools/gopls: getImportPackage crash (PackagePath == "unsafe", id != "unsafe") #60890
Comments
Thank you for the report. This is an interesting crash. There is code explicitly guarding against exporting unsafe in this control flow, but it checks only the package ID, not package path, which could theoretically misidentify a variant of the "unsafe" package.. However, there should not be any variants of the So, I think I can probably fix this, but I don't know how to repro. Can you share anything about the code you were editing when you encountered this crash? Do you have anything interesting in your |
Change https://go.dev/cl/504555 mentions this issue: |
Change https://go.dev/cl/504556 mentions this issue: |
The crash in golang/go#60890 suggests that a user encountered a variant of the unsafe package. I'm not sure how to reproduce this, but in any case we should be checking package path, not ID, when guarding against exporting "unsafe". For golang/go#60890 Change-Id: Ib6c546b8f74ba513f5ee3df09b5ba29cea0c1b85 Reviewed-on: https://go-review.googlesource.com/c/tools/+/504555 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
Absent a repro, I'm not sure if this is fixed, but I will optimistically close this. We can reopen if we get another report. |
@findleyr this was reproable in 0.12.4 for us, but not in latest master branch. Would it be possible to get a 0.12.5 or 0.13 release out? we're currently stuck in 0.11 land, and I'd like to take advantage of the perf updates in 0.12 |
@JamyDev we're aiming for 12.5 soon -- either next week or the week after. You can of course also install gopls at master. Thanks for confirming that it is fixed at master. |
Reopening since we hit an "encountered unsafe as %s" assertion. This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
Change https://go.dev/cl/581175 mentions this issue: |
This is one of our most frequent and oldest open crash bugs. Updates golang/go#60890 Change-Id: I97bdf339ec355aaf23fb81ee8fed11b142d28409 Reviewed-on: https://go-review.googlesource.com/c/tools/+/581175 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
gopls version: v0.12.2 (go1.20.4)
gopls flags: -logfile /home/user/gopls.log -rpc.trace
update flags: off
extension version: 0.38.0-upstream-0.1.7-uber
go version: 1.20.4
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Sun, 18 Jun 2023 04:57:07 GMT
restart history:
Sun, 18 Jun 2023 04:56:23 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>
Dups: WyBEVw 8IUuxg gGL_Og s38AiQ g1WTiA kaOGFA M1Fsyg eMTo4g 4jVSEw
The text was updated successfully, but these errors were encountered: