Issue 5635: test_sys reference counting fails while tracing (original) (raw)

Issue5635

Created on 2009-03-31 23:22 by dugan, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
refcount.patch dugan,2009-03-31 23:22 Patch to make refcount test pass under settrace.
Messages (2)
msg84946 - (view) Author: David Christian (dugan) Date: 2009-03-31 23:22
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.
msg84952 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-01 00:04
Committed in r70933. Thanks!
History
Date User Action Args
2022-04-11 14:56:47 admin set github: 49885
2009-04-01 00:04:41 georg.brandl set status: open -> closednosy: + georg.brandlmessages: + resolution: accepted
2009-03-31 23:22:09 dugan create