-
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: Rename: crash due to Info.Defs[id]=nil bug in checkStructField #70968
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:
|
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: