Message183255
The proposed patch fixes the problem:
* f_lineno cannot be set now from an exception trace function or from a return
trace function.
* The broken arithmetic involving a null pointer (f->f_stacktop, at the end of
frame_setlineno when popping blocks that are being jumped from and the
function is invoked from an exception trace function or a return trace
function), is fixed now.
* Blocks cannot be popped now in frame_setlineno (the cause of the crash) when
tracing a yield.
To summarize the proposed fixes on f_lineno accessors:
* setter: f_lineno can only be set in the frame that is being traced (issue
17277) and from within a line trace function (current issue).
* getter: f_lineno is valid in the frame being traced (issue 17277) and:
+ not from within a call trace function (i.e. when f->f_trace == NULL)
+ from within a line trace function
+ and from within an exception or return trace function. There is a corner
case here when returning to a frame that was not being traced previously
(its f_lineno is not valid) and that has had its local trace function
f_trace set from within a trace function in one of its callees (the fix of
issue 13183 does that) and when the first trace function invoked on
returning to that frame is an exception or a return trace function: this is
correctly handled by the f_trace setter that makes sure that f_lineno is
accurate when setting f_trace (and an extension module implementing tracing,
must ensure that f_lineno is accurate when setting f_trace). |
|
Date |
User |
Action |
Args |
2013-03-01 11:43:08 | xdegaye | set | recipients:
+ xdegaye, jcea, benjamin.peterson |
2013-03-01 11:43:08 | xdegaye | set | messageid: <1362138188.46.0.814288833605.issue17288@psf.upfronthosting.co.za> |
2013-03-01 11:43:08 | xdegaye | link | issue17288 messages |
2013-03-01 11:43:08 | xdegaye | create | |
|