Commit d15ca96
committed
Split dummy in region inference graph into distinct source and sink nodes.
Why do this: The RegionGraph representation previously conflated all
of the non-variable regions (i.e. the concrete regions such as
lifetime parameters to the current function) into a single dummy node.
A single dummy node leads DFS on a graph `'a -> '_#1 -> '_#0 -> 'b` to
claim that `'_#1` is reachable from `'_#0` (due to `'a` and `'b` being
conflated in the graph representation), which is incorrect (and can
lead to soundness bugs later on in compilation, see #30438).
Splitting the dummy node ensures that DFS will never introduce new
ancestor relationships between nodes for variable regions in the
graph.1 parent 36237fc commit d15ca96
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | | - | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1109 | 1116 | | |
1110 | 1117 | | |
1111 | 1118 | | |
| |||
1115 | 1122 | | |
1116 | 1123 | | |
1117 | 1124 | | |
1118 | | - | |
| 1125 | + | |
1119 | 1126 | | |
1120 | 1127 | | |
1121 | | - | |
| 1128 | + | |
1122 | 1129 | | |
1123 | 1130 | | |
1124 | 1131 | | |
| |||
0 commit comments