Commit 9cdc71d
committed
[llvm][cas] Improve UnifiedOnDiskActionCache validation to check cas refs (llvm#171732)
Check that action cache references point to valid CAS objects by
ensuring they are contained within the corresponding CAS and also that
the offsets match. This prevents accidentally referencing "dead" index
records that were not properly flushed to disk, which can lead to the
action cache pointing to the wrong data or to garbage data.
rdar://126642956
(cherry picked from commit a451ff0)1 parent cff3418 commit 9cdc71d
File tree
4 files changed
+57
-21
lines changed- llvm
- include/llvm/CAS
- lib/CAS
- test/tools/llvm-cas
4 files changed
+57
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
291 | 298 | | |
292 | 299 | | |
293 | 300 | | |
| |||
360 | 367 | | |
361 | 368 | | |
362 | 369 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | 370 | | |
375 | 371 | | |
376 | 372 | | |
| |||
404 | 400 | | |
405 | 401 | | |
406 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | | - | |
| 1105 | + | |
| 1106 | + | |
1106 | 1107 | | |
1107 | 1108 | | |
1108 | | - | |
| 1109 | + | |
1109 | 1110 | | |
1110 | 1111 | | |
1111 | 1112 | | |
| |||
1138 | 1139 | | |
1139 | 1140 | | |
1140 | 1141 | | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1141 | 1151 | | |
1142 | 1152 | | |
1143 | 1153 | | |
| |||
1232 | 1242 | | |
1233 | 1243 | | |
1234 | 1244 | | |
1235 | | - | |
1236 | | - | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1237 | 1252 | | |
1238 | 1253 | | |
1239 | 1254 | | |
1240 | 1255 | | |
1241 | 1256 | | |
1242 | | - | |
| 1257 | + | |
1243 | 1258 | | |
1244 | 1259 | | |
1245 | 1260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
0 commit comments