Issue7282
Created on 2009-11-08 00:00 by pitrou, last changed 2009-11-09 16:54 by pitrou.
|
msg95029 - (view) |
Author: Antoine Pitrou (pitrou) |
Date: 2009-11-08 00:00 |
|
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.
|
|
msg95074 - (view) |
Author: Antoine Pitrou (pitrou) |
Date: 2009-11-09 11:59 |
|
An updated patch with test.
|
|
msg95089 - (view) |
Author: Antoine Pitrou (pitrou) |
Date: 2009-11-09 16:54 |
|
Committed in r76172-r76175.
|
|
| Date |
User |
Action |
Args |
| 2009-11-09 16:54:48 | pitrou | set | status: open -> closed resolution: fixed messages:
+ msg95089
stage: patch review -> committed/rejected |
| 2009-11-09 11:59:17 | pitrou | set | files:
+ rlock_leak2.patch
messages:
+ msg95074 |
| 2009-11-08 00:00:39 | pitrou | create | |
|