[New-bugs-announce] [issue7282] RLocks leak references when used in raw threads
Antoine Pitrou
report at bugs.python.org
Sun Nov 8 01:00:40 CET 2009
New submission from Antoine Pitrou <pitrou at free.fr>:
When you use an RLock from a thread which wasn't created through the
high-level `threading` API (but, for example, using
thread.start_new_thread()), the RLock creates a DummyThread object by
calling current_thread(), and that DummyThread is immortal (as well as
its attributes etc.). This implementation wart can easily lead to
reference leaks for unsuspecting users.
One simple solution is not to call current_thread() in RLock, but use
get_ident() instead. Patch attached.
----------
components: Library (Lib)
files: rlock_leak.patch
keywords: patch
messages: 95029
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: RLocks leak references when used in raw threads
type: resource usage
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15287/rlock_leak.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7282>
_______________________________________
More information about the New-bugs-announce
mailing list