-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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 <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. |
1 similar comment
This stack
|
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 TYioIw Uf_DKg
Dups without stacks (volume too great): kDcQPA pPHxjg Et04NQ lAne1w 5q1iTA Bo56Rg flcnug s_ayTw PCuJOA ZnegMg IsWiAw
Dups: nSD9CA mGs3Rg WWsZMg ZBPYCA DESvAg 6IAPOw m6NDdA i0tR-Q BJbmzw rGALVg haDN2Q vaj6OA 05l8Ag cgRtZA JImRiw ugaMgQ EMv0yw kZU18Q 8Chkbw VO-3_A HYLWAQ ThIiZA qAI8kA XQcuPg iQX0Dw rQta-Q dm1LXg 3bpqaw 6rHvAw Q_Q6wg VS4dOA TYUXOQ kq7BNw edVRKw _jGWwQ PV0Tug c7YvIQ SoRmmw fGHMBg V2oXUg OYxA7A 10mQbg no1QsA 13ADSQ PTwXmA RbhLJA grIzbg 2R60mA DrZJsQ dNKXJg Ic03cA EJzn_g dKdDQA -8-fGw LJNitw IdKMfQ zkb6qg rOr9mA 0UG84w R-PT1g Ath4qQ 1zpQyw Xlm2oQ 4XuTFA RWTrBg VUi5lg pddM6A nQ2HQg gVfysA rsVUVg mvqlsg QblXZw t7Y8uQ d7miAg k8qR_A 7KCNbg zz8SRw WWD0sQ zOysOg kcBR7A ynNUDg 4dfGPg wqarWQ rMmP1A tOnEpw XBQYdg S9_PvA Hj4zaQ G0_iow i70XcA rG0l3Q 9CAMjg nzs98w _lEsOw uHsT6Q XGXXsQ q-UVfg 2rzsAA La_X0A 58kcYQ 8xB-8g HBpgew
The text was updated successfully, but these errors were encountered: