Commit 66ec977
committed
Auto merge of rust-lang#17412 - davidhewitt:source-loop-cycle-bail, r=Veykril
fix: add a breaker to avoid infinite loops from source root cycles
See rust-lang#17409
This patch prevents infinite looping from cycles by giving up if the number of source roots checked for a config value reaches the total number of source roots.
Alternative more precise options include creating a set of all source roots visited and giving up as soon as a cycle is encountered, but I wasn't sure how costly an allocation would be here for performance.
Can confirm that locally this fixes the problem for me.1 file changed
+9
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2531 | 2531 | | |
2532 | 2532 | | |
2533 | 2533 | | |
| 2534 | + | |
2534 | 2535 | | |
2535 | 2536 | | |
2536 | 2537 | | |
2537 | 2538 | | |
2538 | 2539 | | |
2539 | 2540 | | |
2540 | 2541 | | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
2541 | 2550 | | |
2542 | 2551 | | |
2543 | 2552 | | |
| |||
0 commit comments