-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split dummy-idx node to fix expand_givens DFS #31442
Split dummy-idx node to fix expand_givens DFS #31442
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
I would just split |
I found that bug independently (that's what I deserve for going bug-hunting with such a huge notification backlog), and it was the same givens bug. |
Ah yeah splitting dummy_idx sounds better in nearly every way. I'll do that tomorrow |
544dafc
to
77c8850
Compare
Also, this fix is so simple that I'm nominating it to be merged to beta as well. |
…odes. 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 rust-lang#30438). Splitting the dummy node ensures that DFS will never introduce new ancestor relationships between nodes for variable regions in the graph.
@bors r+ |
📌 Commit 77c8850 has been approved by |
…g-expand-givens-dfs, r=nikomatsakis Split dummy-idx node to fix expand_givens DFS (Much more detail in commit comments.) Fix #30438.
We don't normally backport random fixes, but this seems like both a severe problem (unsoundness and a kind of random one) and a simple fix, so go for it. |
Split dummy-idx node to fix expand_givens DFS
(Much more detail in commit comments.)
Fix #30438.