diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-09-05 22:59:49 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-09-05 22:59:49 (GMT) |
commit | 56cd62c04a7fbd9d923de000e6e6734cf8ac9ddc (patch) | |
tree | ed5ce8c8953b5f8f6ed136a94629f631083f2594 /Python | |
parent | 1d857453b7065dafdc34a72c1bbb2a993782b383 (diff) | |
download | cpython-56cd62c04a7fbd9d923de000e6e6734cf8ac9ddc.zip cpython-56cd62c04a7fbd9d923de000e6e6734cf8ac9ddc.tar.gz cpython-56cd62c04a7fbd9d923de000e6e6734cf8ac9ddc.tar.bz2 |
Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Because of this change, a couple extension modules compiled for 3.2.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 3.2.3 and earlier. However, extension modules
compiled for 3.2.3 and earlier will be loadable by 3.2.4.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pystate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 1392331..42bc3ec 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -206,6 +206,9 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->c_profileobj = NULL; tstate->c_traceobj = NULL; + tstate->trash_delete_nesting = 0; + tstate->trash_delete_later = NULL; + if (init) _PyThreadState_Init(tstate); |