Commit fe61fd1
committed
tree: avoid index-of-bounds panics in GetAnnotation in production
We've recently seen two panics when trying to access the Annotations
container and hitting the out-of-bounds condition. The annotations are
used to provide additional information about unresolved object names, so
if we simply return `nil` on an invalid access, we'll keep on using the
unresolved object name, which seems like a better option than process
crash. In test builds we'll keep on crashing.
Release note: None1 parent 5741bf6 commit fe61fd1
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
| |||
0 commit comments