Author glchapman
Recipients
Date 2004-11-08.23:32:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=86307

I ran into this today, so I decided to look into it.  It
looks to me like the problem only happens if you profile
with lineevents enabled.  In that case, hotshot uses the
tracer_callback function (in _hotshot.c) to dispatch trace
events.  This function explicitly ignores exception returns
(PyTrace_EXCEPTION), which can lead to an unbalanced stack
of calls/returns when the log is loaded (if an profiled
function exits with an exception).

It seems on the surface that tracer_callback ought to handle
exceptions the same way as normal returns.  This would be
consistent with what happens when profiler_callback is used,
since PyEval_EvalFrame dispatches sends a Py_RETURN to
c_profilefunc when exiting because of an exception.
History
Date User Action Args
2007-08-23 14:20:03adminlinkissue900092 messages
2007-08-23 14:20:03admincreate