SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 130 Python

bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079)

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.
T
T. Wouters committed
c8165036f374cd2ee64d4314eeb2514f7acb5026
Parent: 7774d78
Committed by Gregory P. Smith <greg@krypto.org> on 9/28/2019, 2:49:15 PM