-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: Rename: crash due to Info.Defs[id]=nil bug in checkStructField #70968
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
Comments
This has essentially the same root cause as #69362. |
Thanks. Let's put this in v0.18.0 for now. Since it is in rename (and likely in the context of a broken build), I think it is not too disruptive to leave it until the v0.18.0 release. Can re-evaluate if we see this frequently. Of course, we still have no idea how this scenario arises... |
Yay, repro: type T int
type T struct { f int } // rename f to g
|
We really need to write down all the invariants of go/ast and go/types, including:
|
Change https://go.dev/cl/663895 mentions this issue: |
Change https://go.dev/cl/663915 mentions this issue: |
Updates #70968 Change-Id: Id0a4acd6bad917ba8a5c439625bca14469b6eb7c Reviewed-on: https://go-review.googlesource.com/c/go/+/663895 Auto-Submit: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Issue created by stacks.
This stack
Zepg4g
was reported by telemetry:crash/crash
runtime.gopanic:+69
runtime.panicmem:=262
runtime.sigpanic:+19
golang.org/x/tools/gopls/internal/golang.(*renamer).checkStructField:+36
golang.org/x/tools/gopls/internal/golang.(*renamer).check:+14
golang.org/x/tools/gopls/internal/golang.(*renamer).checkInLexicalScope:+62
golang.org/x/tools/gopls/internal/golang.(*renamer).checkInPackageBlock:+47
golang.org/x/tools/gopls/internal/golang.(*renamer).check:+12
golang.org/x/tools/gopls/internal/golang.renameObjects:+24
golang.org/x/tools/gopls/internal/golang.renameExported:+56
golang.org/x/tools/gopls/internal/golang.renameOrdinary:+157
golang.org/x/tools/gopls/internal/golang.Rename:+24
golang.org/x/tools/gopls/internal/server.(*server).Rename:+17
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+489
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
Dups: _A3zlQ
The text was updated successfully, but these errors were encountered: