New submission from STINNER Victor <[EMAIL PROTECTED]>:

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().

----------
files: _lsprof_clear.patch
keywords: patch
messages: 73689
nosy: haypo
severity: normal
status: open
title: _lsprof: clear() should call flush_unmatched()
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11586/_lsprof_clear.patch

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3952>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to