golang/go

x/tools/gopls: "slice bounds out of range" crash in ExtractToNewFile

Opened this issue · 8 comments

I think the root cause here is a bad ast.File.FileStart (#70162), because the logic in gopls looks unimpeachable. I'll add more range-checking assertions to gopls so that we get more specific failure information in future.

Change https://go.dev/cl/631675 mentions this issue: gopls/internal/golang: refine crash golang/go#70553

Change https://go.dev/cl/631676 mentions this issue: all: merge master (68e4702) into gopls-release-branch.0.17

Change https://go.dev/cl/663955 mentions this issue: gopls/internal/golang: yet more refinement of golang/go#70553

I've refined the assertions for v0.19. Pushing this issue to v0.20.