New submission from Mark Shannon <m...@hotpy.org>:

Debuggers are allowed to change the line number of the currently executing 
frame. Regardless of whether this is sensible or not, the current 
implementation rather fragile.

The code makes various assumptions about the layout of the bytecode that may 
not be true in the future, and I suspect, are not true now.

We should use a more brute-force approach of computing the exception stack for 
the whole function and then searching for a safe place to jump to. This is not 
only more robust it allows more jumps.

For example, it is safe to jump from one exception handler to another.
It may not be sensible, but it is safe.

----------
components: 2to3 (2.x to 3.x conversion tool)
messages: 365990
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Make setting line number in frame more robust.

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to