-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/golang: refine crash golang/go#70553
This CL adds defensive assertions to ExtractToNewFile, which experiences a crash due to out-of-bounds indexing. The logic looks sound, but clearly something is off. This CL also fixes a mistake in the logic added to parsego.Parse to work around golang/go#70162 (missing File.FileStart in go/parser), but I don't think that bug explains golang/go#70553 because it is concerned only with deeply broken files. Updates golang/go#70553 Updates golang/go#70162 Change-Id: Ie4f6fbbde2046023d7a3b865e5810bbed3be3118 Reviewed-on: https://go-review.googlesource.com/c/tools/+/631675 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
- Loading branch information
Showing
3 changed files
with
65 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters