-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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") (Bazel?) #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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
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. |
Change https://go.dev/cl/594955 mentions this issue: |
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. |
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/605735 mentions this issue: |
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. |
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 DdusYg 2wkHKQ bexi2A Hf_uxA WAPo2A 7eM7_A PhUfgg JInHxA xwn1Jg OdVCcg mYyn3yw IdUP_g qbPZnw hHYY5A xvGtWg H2awJg LhpC0g Yy4aKQ PbxusA i-qkVg fF_MIA s22TCw NOX_YQ wRPq1w ZWkRNQ Yyn3yw ZWkRNQ Yyn3yw 6-MKJQ gkuQUg 138-Ow OpRVTQ Xb0U6w 4jr9sA MvEEmQ KAVPYA 1mE0sg PkqU2A uenBJg HU5Q-Q Ywq8Dw WsakRw jE3s2Q 2W-IrQ
Dups without stacks (volume too great): kDcQPA pPHxjg Et04NQ lAne1w 5q1iTA Bo56Rg flcnug s_ayTw PCuJOA ZnegMg IsWiAw
The text was updated successfully, but these errors were encountered: