Skip to content

gh-124871: fix 'visited' tracking in compiler's reachability analysis#124952

Merged
iritkatriel merged 2 commits into
python:mainfrom
iritkatriel:gh-124871
Oct 4, 2024
Merged

gh-124871: fix 'visited' tracking in compiler's reachability analysis#124952
iritkatriel merged 2 commits into
python:mainfrom
iritkatriel:gh-124871

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Oct 3, 2024

Copy link
Copy Markdown
Member

This fixes reachability analysis to mark blocks as visited once they are inserted to the queue (as is done in other traversals), and then we can remove an assertion that failed for the code in the issue.

Fixes #124871.

@iritkatriel iritkatriel merged commit f474391 into python:main Oct 4, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 4, 2024
…alysis (pythonGH-124952)

(cherry picked from commit f474391)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Oct 4, 2024

Copy link
Copy Markdown

GH-124977 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Oct 4, 2024
Yhg1s pushed a commit that referenced this pull request Oct 4, 2024
…nalysis (GH-124952) (#124977)

gh-124871: fix 'visited' tracking in compiler's reachability analysis (GH-124952)
(cherry picked from commit f474391)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@hugovk

hugovk commented Oct 7, 2024

Copy link
Copy Markdown
Member

Tip for next time: please upgrade blurb so it doesn't include spaces in the paths. Thanks!

https://discuss.python.org/t/new-blurb-1-2-please-upgrade/59159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove_unreachable: Assertion `target->b_predecessors == 0 || target == b->b_next' failed

3 participants