Xavier de Gaye added the comment: Nosying Benjamin Peterson who knows frame_setlineno (issue 14612) and nosying Jesús Cea Avión. Hoping they don't mind.
This problem occurs also when setting f_lineno from an exception debug event. One may crash the interpreter (or get a "SystemError: unknown opcode") when the return debug event is one that handles a yield statement. For example the following test causes a segmentation fault on python 3.3.0: $ python /tmp/jump.py > /tmp/jump.py(7)<module>() -> for i in gen(): (Pdb) step --Call-- > /tmp/jump.py(1)gen() -> def gen(): (Pdb) step > /tmp/jump.py(2)gen() -> for i in range(1): (Pdb) step > /tmp/jump.py(3)gen() -> yield i (Pdb) step --Return-- > /tmp/jump.py(3)gen()->0 -> yield i (Pdb) jump 2 > /tmp/jump.py(2)gen()->0 -> for i in range(1): (Pdb) step > /tmp/jump.py(8)<module>() -> lineno = 8 (Pdb) step > /tmp/jump.py(7)<module>() -> for i in gen(): (Pdb) step --Call-- > /tmp/jump.py(2)gen()->0 -> for i in range(1): (Pdb) step Segmentation fault ---------- nosy: +benjamin.peterson, jcea Added file: http://bugs.python.org/file29282/jump.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17288> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com