Commit 09efdc9
committed
fix(snapshot): switch PCI snapshot state vectors for arrays
Using serde-big-array, switch to serializing arrays rather than
converting arrays to vecs. This should prevent panics that could
previously be encountered by unwrapping vec-to-array conversions (e.g.,
when a malformed snapshot was encountered).
NB: Arrays must be boxed to prevent stack overflows. This is still
better than using Vecs, because the size is known at compile time.
Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>1 parent 6673d4d commit 09efdc9
2 files changed
Lines changed: 39 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
610 | 613 | | |
611 | 614 | | |
612 | 615 | | |
613 | | - | |
| 616 | + | |
| 617 | + | |
614 | 618 | | |
615 | 619 | | |
616 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
21 | 41 | | |
22 | 42 | | |
23 | 43 | | |
| |||
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
67 | | - | |
| 87 | + | |
| 88 | + | |
68 | 89 | | |
69 | 90 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
73 | 96 | | |
74 | 97 | | |
75 | 98 | | |
| |||
131 | 154 | | |
132 | 155 | | |
133 | 156 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
137 | 160 | | |
138 | 161 | | |
139 | 162 | | |
| |||
143 | 166 | | |
144 | 167 | | |
145 | 168 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
149 | 172 | | |
150 | 173 | | |
151 | 174 | | |
| |||
0 commit comments