Issue 3952: _lsprof: clear() should call flush_unmatched() (original) (raw)

Issue3952

Created on 2008-09-24 01:22 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_lsprof_clear.patch vstinner,2008-09-24 01:22 profiler_clear() calls flush_unmatched()
Messages (2)
msg73689 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-09-24 01:22
Example to reproduce the bug (using Python trunk): --- from gc import collect import _lsprof def callMethod(obj): obj.clear() collect() obj = _lsprof.Profiler() obj.enable() callMethod(obj) obj.enable() del obj collect() --- The problem is that the profiler is still running when exiting callMethod() and so it tries to use callMethod context which was free'd just before by profiler_clear().
msg77640 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-12-11 23:13
I'm unable to reproduce my issue with Python trunk, so close it.
History
Date User Action Args
2022-04-11 14:56:39 admin set github: 48202
2008-12-11 23:13:52 vstinner set status: open -> closedmessages: +
2008-09-24 01:22:08 vstinner create