Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Bug report
Bug description:
The following code causes a crash on cpython 3.13 branch (f5289c4) and the current main.
importastcode="""try: if name_4: pass else: passexcept* name_0: passelse: name_4"""tree=ast.parse(code)fornodeinast.walk(tree):ifhasattr(node,"lineno"):delnode.linenodelnode.end_linenodelnode.col_offsetdelnode.end_col_offsetcompile(ast.fix_missing_locations(tree),"<file>","exec")
output (Python 3.13.0a3+):
python:Python/flowgraph.c:511:no_redundant_jumps:Assertion `0'failed.
I bisected the problem down to2091fb2.
@iritkatriel can you take a look at it?
CPython versions tested on:
3.13, CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks #120425
- [3.13] gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (GH-120425) #120621
- gh-120367: fix bug where compiler detects redundant jump after pseudo op replacement #120714
- [3.13] gh-120367: fix bug where compiler detects redundant jump after pseudo op replacement (GH-120714) #120716