Skip to content
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

tools/internal/lsp: panic in staticcheck during package rename #35156

Closed
leitzler opened this issue Oct 25, 2019 · 2 comments
Closed

tools/internal/lsp: panic in staticcheck during package rename #35156

leitzler opened this issue Oct 25, 2019 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@leitzler
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version 1.13.3 linux/amd

golang.org/x/tools@v0.0.0-20191025023517-2077df36852e

What did you do?

In a medium sized project I moved files from one package to another before gopls was running, so that I had a package that contained several go files where some of them had incorrect package ...-declaration at the top.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x792b0a]

goroutine 7784 [running]:
honnef.co/go/tools/ssa.memberFromObject(0xc010fa6c60, 0x0, 0x0, 0xd99c60, 0xc00fb98c60)
   /home/leitzler/go/pkg/mod/honnef.co/go/tools@v0.0.1-2019.2.3/ssa/create.go:50 +0x3a
honnef.co/go/tools/ssa.membersFromDecl(0xc010fa6c60, 0xda3bc0, 0xc00fb98c60)
   /home/leitzler/go/pkg/mod/honnef.co/go/tools@v0.0.1-2019.2.3/ssa/create.go:150 +0x4d2
honnef.co/go/tools/ssa.(*Program).CreatePackage(0xc00e172dc0, 0xc004d4b8b0, 0xc0112a08e0, 0x3, 0x4, 0xc004c8b220, 0xb84000, 0xc0002ccc08)
   /home/leitzler/go/pkg/mod/honnef.co/go/tools@v0.0.1-2019.2.3/ssa/create.go:191 +0x257
honnef.co/go/tools/internal/passes/buildssa.run(0xc00e172d20, 0xc01128cae0, 0x3, 0x4, 0x0)
   /home/leitzler/go/pkg/mod/honnef.co/go/tools@v0.0.1-2019.2.3/internal/passes/buildssa/buildssa.go:69 +0x266
golang.org/x/tools/internal/lsp/cache.runAnalysis(0xda5fc0, 0xc011265a00, 0xc00027d100, 0xc0121a3770, 0xc00dd65748, 0x4704d4, 0xc0204694a8, 0xffffffffffffffff, 0xc00dd657c0, 0xa8ea0c, ...)
   /home/leitzler/go/pkg/mod/golang.org/x/tools@v0.0.0-20191025023517-2077df36852e/internal/lsp/cache/analysis.go:246 +0x5e0
golang.org/x/tools/internal/lsp/cache.(*snapshot).actionHandle.func1(0xda5fc0, 0xc011265a00, 0xcb7c28, 0xc0011f81f0)
   /home/leitzler/go/pkg/mod/golang.org/x/tools@v0.0.0-20191025023517-2077df36852e/internal/lsp/cache/analysis.go:126 +0x8d
golang.org/x/tools/internal/memoize.(*Handle).run.func1(0xc0121a37c0, 0xda5fc0, 0xc011265a00)
   /home/leitzler/go/pkg/mod/golang.org/x/tools@v0.0.0-20191025023517-2077df36852e/internal/memoize/memoize.go:183 +0x3e
created by golang.org/x/tools/internal/memoize.(*Handle).run
   /home/leitzler/go/pkg/mod/golang.org/x/tools@v0.0.0-20191025023517-2077df36852e/internal/memoize/memoize.go:180 +0xfd
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Oct 25, 2019
@leitzler
Copy link
Contributor Author

@gopherbot please add label Tools

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 25, 2019
@stamblerre stamblerre self-assigned this Nov 7, 2019
@leitzler
Copy link
Contributor Author

I think this is obsolete by far now and I haven't seen the issue again, closing.

@golang golang locked and limited conversation to collaborators Jan 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants