Commit 4512927
committed
LifetimeDependenceDefUseAddressWalker: avoid infinite recursion.
This utility is used by DependentAddressUseDefWalker which now conservatively
follows all possible uses. This could result in the same address being reached
multiple times during a def-use walk. Ensure that we don't infinitely recurse.
There is no small test case for this, but the fix is trivial and standard
practice for such walkers, and this is hit quickly in real usage, so there is no
danger of it regressing.
Fixes rdar://150403948 ([nonescapable] Infinite recursion compiler crash in
lifetime dependence checking)1 parent 11cf263 commit 4512927
File tree
2 files changed
+17
-1
lines changed- SwiftCompilerSources/Sources/Optimizer
- FunctionPasses
- Utilities
2 files changed
+17
-1
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
427 | 431 | | |
428 | 432 | | |
429 | 433 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
821 | 824 | | |
822 | 825 | | |
823 | 826 | | |
| |||
1199 | 1202 | | |
1200 | 1203 | | |
1201 | 1204 | | |
| 1205 | + | |
| 1206 | + | |
1202 | 1207 | | |
1203 | 1208 | | |
1204 | 1209 | | |
| |||
1221 | 1226 | | |
1222 | 1227 | | |
1223 | 1228 | | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1224 | 1232 | | |
1225 | 1233 | | |
1226 | 1234 | | |
| |||
1333 | 1341 | | |
1334 | 1342 | | |
1335 | 1343 | | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
1336 | 1348 | | |
1337 | 1349 | | |
1338 | 1350 | | |
| |||
0 commit comments