Commit 8b6e84b
gopls/internal/crash: don't crash in xrefs on out of bound nodes
As we've seen many times, it is currently (unfortunately) possible that
go/ast nodes exceed the bounds of the parsed file. Handle this
possibility correctly while building the xrefs index.
Updates golang/go#66683
Fixes golang/go#70446
Change-Id: If6364876eb7b8ed8ca11a058417aa028d6b55b41
Reviewed-on: https://go-review.googlesource.com/c/tools/+/630675
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>1 parent 936a401 commit 8b6e84b
1 file changed
+19
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 47 | | |
56 | 48 | | |
57 | 49 | | |
| |||
82 | 74 | | |
83 | 75 | | |
84 | 76 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
| |||
102 | 99 | | |
103 | 100 | | |
104 | 101 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
0 commit comments