x/tools/gopls: crash in type checker with cgo #44397
Open
Comments
Thanks for the report. This is a dupe of #44353, which was just reported yesterday. Thanks for the extra info -- the go version and repro are very helpful. Given that none of this executing code is new, I'm a little surprised to get two reports in such quick succession. |
As mentioned in the other issue: from the panic site and description, the assignment operand being checked is probably a cgofunc. Perhaps we simply need to add a case here, but I need to think about it a bit more: Note that gopls will have set (via reflection) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gopls version: v0.6.5
gopls flags:
extension version: 0.22.1
environment: Visual Studio Code darwin
initialization error: undefined
manual restart count: 0
total start count: 1
Describe what you observed.
I was editing a Go function when the crash notice showed up. I didn't notice any strange behavior or issues before the message.
The full log is huge (20k lines and 1 MiB) so I'll just provide the last few messages and the function I was working on at the time (seems relevant considering the stacktrace). However, I have the full log saved so feel free to ask for specific parts.
The same message appeared several times. This issue seems to occur whenever I change the C preamble and vanishes once I click the "Regenerate cgo definitions" action.
Here's the function I was working on. I just finished typing
C.GoStringN(
when the crash occured.The installed Go version is 1.15.8.
The text was updated successfully, but these errors were encountered: