[Python-checkins] python/dist/src/Misc NEWS,1.831.4.75,1.831.4.76

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Thu Nov 20 17:13:53 EST 2003


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv10811/Misc

Modified Files:
      Tag: release23-maint
	NEWS 
Log Message:
SF bug 839548:  Bug in type's GC handling causes segfaults.
Also SF patch 843455.

This is a critical bugfix, backported from 2.4 development.
I don't intend to backport beyond 2.3 maint.  The bugs this fixes
have been there since weakrefs were introduced.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.831.4.75
retrieving revision 1.831.4.76
diff -C2 -d -r1.831.4.75 -r1.831.4.76
*** NEWS	14 Nov 2003 10:27:26 -0000	1.831.4.75
--- NEWS	20 Nov 2003 22:13:50 -0000	1.831.4.76
***************
*** 13,16 ****
--- 13,31 ----
  -----------------
  
+ - 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





More information about the Python-checkins mailing list