Skip to content

compiler's line number propagation algorithm could be more robust #103795

Open
@iritkatriel

Description

@iritkatriel

The bug in #101517 was due to a raise instruction not being assigned a line number. This happened because the compiler's line number propagation algorithm cannot propagate line numbers to blocks that have two predecessors. The fix for that case was to reorganise the instructions so that this situation is avoided.

We should

  1. Be able to detect when this happens (via assertions in the compiler).
  2. Make the line number propagation algorithm more robust so that this doesn't happen.

See also #103550 (review).

CC @carljm

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions