diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-10-30 23:09:22 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-10-30 23:09:22 (GMT) |
commit | ead8b7ab3008bda9b6a50d6d9d02ed68dab3b0fd (patch) | |
tree | 88d586b297a7587ee6face7b687b8a0008a2c3c1 /Misc/NEWS | |
parent | d7bcf4deb174e5e5b6548eb64fe2b0735da5dc95 (diff) | |
download | cpython-ead8b7ab3008bda9b6a50d6d9d02ed68dab3b0fd.zip cpython-ead8b7ab3008bda9b6a50d6d9d02ed68dab3b0fd.tar.gz cpython-ead8b7ab3008bda9b6a50d6d9d02ed68dab3b0fd.tar.bz2 |
SF 1055820: weakref callback vs gc vs threads
In cyclic gc, clear weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced. I'll backport to 2.3.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -32,6 +32,17 @@ License Version 2. Core and builtins ----------------- +- Bug #1055820 Cyclic garbage collection was not protecting against that + calling a live weakref to a piece of cyclic trash could resurrect an + insane mutation of the trash if any Python code ran during gc (via + running a dead object's __del__ method, running another callback on a + weakref to a dead object, or via any Python code run in any other thread + that managed to obtain the GIL while a __del__ or callback was running + in the thread doing gc). The most likely symptom was "impossible" + ``AttributeEror`` exceptions, appearing seemingly at random, on weakly + referenced objects. The cure was to clear all weakrefs to unreachable + objects before allowing any callbacks to run. + - Bug #1054139 _PyString_Resize() now invalidates its cached hash value. Extension Modules |