[New-bugs-announce] [issue5635] test_sys reference counting fails while tracing

David Christian report at bugs.python.org
Wed Apr 1 01:22:10 CEST 2009


New submission from David Christian <dbc at rpath.com>:

test_sys refcount test checks that assigning None to a local variable n
increases the references to None by exactly 1.

However sys.settrace is set, then the frame object must be instantiated
to be passed to the trace object.  This increments the reference count
to None again.  Since the locals are not then removed from the frame
object after the sys.settrace call, the number of references remains
increased after the settrace function is exited.

This problem can be avoided by making n a global.

----------
files: refcount.patch
keywords: patch
messages: 84946
nosy: dugan
severity: normal
status: open
title: test_sys reference counting fails while tracing
Added file: http://bugs.python.org/file13530/refcount.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5635>
_______________________________________


More information about the New-bugs-announce mailing list