Xavier de Gaye <xdeg...@gmail.com> added the comment:

Fixed a bug in the implementation of PR 12419 while running the coverage.py 
test suite: f_lineno must be valid upon 'call' trace events. The confusion 
stems from the reason why until now we have prevented line jumps from 'call' 
trace events, see below.

Summary:
  * Full coverage.py tests OK (including the C tracer).
  * Fixes issues #7238, #16482, #17277 and #17697.
  * We could now remove the restriction that prevents jumps from a call trace 
event. The restriction was based on the fact that f->f_trace is NULL until 
after the first return from call_trampoline() and setting f_lineno from within 
this first call to call_trampoline() would have had the f_lineno getter still 
return the value returned by PyCode_Addr2Line(), very confusing for the user !
  * A trace function may be set in an extension modules by PyEval_SetTrace() 
and the extension module may not use f->f_trace and still make jumps using 
f_lineno.
  * Fixes _PyTraceback_Add() at 
https://github.com/python/cpython/blob/58721a903074d28151d008d8990c98fc31d1e798/Python/traceback.c#L272

----------

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

Reply via email to