-
Notifications
You must be signed in to change notification settings - Fork 17.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/token: correct out-of-bounds token offsets and positions
Per the discussion on the issue, make methods that depend on incoming offsets or positions tolerant in the presence of out-of-bounds values by adjusting the values as needed. Add an internal flag debug that can be set to enable the old (not fault-tolerant) behavior. Fixes #57490. Change-Id: I8a7d422b9fd1d6f0980fd4e64da2f0489056d71e Reviewed-on: https://go-review.googlesource.com/c/go/+/559436 Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Bypass: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
- Loading branch information
Showing
3 changed files
with
130 additions
and
17 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