-
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/lsp/frob: add defensive header
I can't explain the crash in the bug report: the frob logic looks sound, which leaves these possibilities: (a) the provided data is garbage or is being trampled (but the caller logic looks sound); (b) the file contents are corrupted (but the filecache SHA256 checksum was fine); (c) there's a RAM problem (but that always feels like a cop-out explanation). I've added a magic number to the file header so that there's a chance we'll detect some variants of a and b. Updates golang/go#62383 Change-Id: Icd32a2dc6ab019f3deee1b332428e0313c93a6ff Reviewed-on: https://go-review.googlesource.com/c/tools/+/524655 Run-TryBot: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information
Showing
3 changed files
with
16 additions
and
7 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