Skip to content

Commit 31f056a

Browse files
adonovangopherbot
authored andcommitted
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]>
1 parent 656fcde commit 31f056a

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
@@ -1290,6 +1290,15 @@ func (act *action) exec() (interface{}, *actionSummary, error) {
12901290
if end == token.NoPos {
12911291
end = start
12921292
}
1293+
1294+
// debugging #64547
1295+
if start < token.Pos(tokFile.Base()) {
1296+
bug.Reportf("start < start of file")
1297+
}
1298+
if end > token.Pos(tokFile.Base()+tokFile.Size()+1) {
1299+
bug.Reportf("end > end of file + 1")
1300+
}
1301+
12931302
return p.PosLocation(start, end)
12941303
}
12951304
}

0 commit comments

Comments
 (0)