summaryrefslogtreecommitdiff
path: root/Misc
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-11-20 21:21:46 +0000
committerTim Peters <tim.peters@gmail.com>2003-11-20 21:21:46 +0000
commit9204576b93fd3a0a5b658d43a0756ef71a514d10 (patch)
treed6fc6a6804a7641dd5551b8734ace4a69de88191 /Misc
parentf8a46271005dbec94d1bd023baecfb4b7d60f7a6 (diff)
downloadcpython-9204576b93fd3a0a5b658d43a0756ef71a514d10.tar.gz
SF bug 839548: Bug in type's GC handling causes segfaults.
Also SF patch 843455. This is a critical bugfix. I'll backport to 2.3 maint, but not beyond that. The bugs this fixes have been there since weakrefs were introduced.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS21
1 files changed, 18 insertions, 3 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index c19d417746..30fe4be67f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,9 +12,20 @@ What's New in Python 2.4 alpha 1?
Core and builtins
-----------------
-- Compiler flags set in PYTHONSTARTUP are now active in __main__.
-
-- Added two builtin types, set() and frozenset().
+- Critical bugfix, for SF bug 839548: if a weakref with a callback,
+ its callback, and its weakly referenced object, all became part of
+ cyclic garbage during a single run of garbage collection, the order
+ in which they were torn down was unpredictable. It was possible for
+ the callback to see partially-torn-down objects, leading to immediate
+ segfaults, or, if the callback resurrected garbage objects, to
+ resurrect insane objects that caused segfaults (or other surprises)
+ later. In one sense this wasn't surprising, because Python's cyclic gc
+ had no knowledge of Python's weakref objects. It does now. When
+ weakrefs with callbacks become part of cyclic garbage now, those
+ weakrefs are cleared first. The callbacks don't trigger then,
+ preventing the problems. If you need callbacks to trigger, then just
+ as when cyclic gc is not involved, you need to write your code so
+ that weakref objects outlive the objects they weakly reference.
- Critical bugfix, for SF bug 840829: if cyclic garbage collection
happened to occur during a weakref callback for a new-style class
@@ -22,6 +33,10 @@ Core and builtins
in a debug build, a segfault occurred reliably very soon after).
This has been repaired.
+- Compiler flags set in PYTHONSTARTUP are now active in __main__.
+
+- Added two builtin types, set() and frozenset().
+
- Added a reversed() builtin function that returns a reverse iterator
over a sequence.