• T. Wouters's avatar
    bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) · c8165036
    T. Wouters authored
    Document that lnotab can contain invalid bytecode offsets (because of
    terrible reasons that are difficult to fix). Make dis.findlinestarts()
    ignore invalid offsets in lnotab. All other uses of lnotab in CPython
    (various reimplementations of addr2line or line2addr in Python, C and gdb)
    already ignore this, because they take an address to look for, instead.
    
    Add tests for the result of dis.findlinestarts() on wacky constructs in
    test_peepholer.py, because it's the easiest place to add them.
    c8165036
lnotab_notes.txt 5.91 KB