Skip to content

no_redundant_jumps: Assertion `0' failed #120367

@15r10nk

Description

@15r10nk

Bug report

Bug description:

The following code causes a crash on cpython 3.13 branch (f5289c4) and the current main.

import ast code=""" try:  if name_4:  pass  else:  pass except* name_0:  pass else:  name_4 """ tree = ast.parse(code) for node in ast.walk(tree): if hasattr(node,"lineno"): del node.lineno del node.end_lineno del node.col_offset del node.end_col_offset compile(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 to 2091fb2.
@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

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions