Skip to content

Commit 86c58d0

Browse files
adonovangopherbot
authored andcommitted
[gopls-release-branch.0.15] gopls/internal/cache: add assertions for telemetry crash
Updates golang/go#64547 Change-Id: I35b2477b8f6182bf6774095f18726104227a2fcd Reviewed-on: https://go-review.googlesource.com/c/tools/+/569935 Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Alan Donovan <[email protected]> (cherry picked from commit 31f056a) Reviewed-on: https://go-review.googlesource.com/c/tools/+/569880 Auto-Submit: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent 3f95539 commit 86c58d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gopls/internal/cache/analysis.go

+9
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,15 @@ func (act *action) exec() (interface{}, *actionSummary, error) {
12891289
if end == token.NoPos {
12901290
end = start
12911291
}
1292+
1293+
// debugging #64547
1294+
if start < token.Pos(tokFile.Base()) {
1295+
bug.Reportf("start < start of file")
1296+
}
1297+
if end > token.Pos(tokFile.Base()+tokFile.Size()+1) {
1298+
bug.Reportf("end > end of file + 1")
1299+
}
1300+
12921301
return p.PosLocation(start, end)
12931302
}
12941303
}

0 commit comments

Comments
 (0)