diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-09-05 23:17:42 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-09-05 23:17:42 (GMT) |
commit | 5b4faae30748c09930fa053442e1d6ff2823823c (patch) | |
tree | 8372fb8975488a6cb3fb5295ef52badfb31aa93d /Python | |
parent | 11946fbe804d99d26724e65dcb061cda6666c4e9 (diff) | |
parent | 56cd62c04a7fbd9d923de000e6e6734cf8ac9ddc (diff) | |
download | cpython-5b4faae30748c09930fa053442e1d6ff2823823c.zip cpython-5b4faae30748c09930fa053442e1d6ff2823823c.tar.gz cpython-5b4faae30748c09930fa053442e1d6ff2823823c.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.
Note that the trashcan functions are part of the stable ABI, therefore
they have to be kept around for binary compatibility of extensions.
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 8dc570a..cfd61d0 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); |