Skip to content

Backport pr 31442 to beta: Split dummy-idx node to fix expand_givens DFS#31768

Merged
alexcrichton merged 2 commits into
rust-lang:betafrom
pnkfelix:beta-backport-pr-31442
Feb 19, 2016
Merged

Backport pr 31442 to beta: Split dummy-idx node to fix expand_givens DFS#31768
alexcrichton merged 2 commits into
rust-lang:betafrom
pnkfelix:beta-backport-pr-31442

Conversation

@pnkfelix
Copy link
Copy Markdown
Contributor

Backport pr #31442 to beta

…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.
alexcrichton added a commit that referenced this pull request Feb 19, 2016
Backport pr 31442 to beta: Split dummy-idx node to fix expand_givens DFS
@alexcrichton alexcrichton merged commit 08827af into rust-lang:beta Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants