<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules, branch v2.2.3c1</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>Squash new compiler wng (mistmatching formal/actual pointer types).</title>
<updated>2003-05-22T18:45:47+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-05-22T18:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4ab4393526b423a582deed6707666738b3727c5f'/>
<id>4ab4393526b423a582deed6707666738b3727c5f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport fix for SF bug 692776.</title>
<updated>2003-05-22T18:11:20+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2003-05-22T18:11:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=826f68b25b8fe952c58ee71a8f954a0909218240'/>
<id>826f68b25b8fe952c58ee71a8f954a0909218240</id>
<content type='text'>
Add a tp_new slot to function objects that handles the case of a
function requiring a closure.  Put the function type in the new
module, rather than having a function new.function().  Add tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a tp_new slot to function objects that handles the case of a
function requiring a closure.  Put the function type in the new
module, rather than having a function new.function().  Add tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>PyType_Ready():  Complain if the type is a base type, and gc'able, and</title>
<updated>2003-05-21T20:43:10+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-05-21T20:43:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=97719c9ce56bfb19fa7b0833c8c7947ad2fd7e52'/>
<id>97719c9ce56bfb19fa7b0833c8c7947ad2fd7e52</id>
<content type='text'>
tp_free is NULL or PyObject_Del at the end.  Because it's a base type
it must call tp_free in its dealloc function, and because it's gc'able
it must not call PyObject_Del.

inherit_slots():  Don't inherit tp_free unless the type and its base
agree about whether they're gc'able.  If the type is gc'able and the
base is not, and the base uses the default PyObject_Del for its
tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate
default for a gc'able type).

cPickle.c:  The Pickler and Unpickler types claim to be base classes
and gc'able, but their dealloc functions didn't call tp_free.
Repaired that.  Also call PyType_Ready() on these typeobjects, so
that the correct (PyObject_GC_Del) default memory-freeing function
gets plugged into these types' tp_free slots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tp_free is NULL or PyObject_Del at the end.  Because it's a base type
it must call tp_free in its dealloc function, and because it's gc'able
it must not call PyObject_Del.

inherit_slots():  Don't inherit tp_free unless the type and its base
agree about whether they're gc'able.  If the type is gc'able and the
base is not, and the base uses the default PyObject_Del for its
tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate
default for a gc'able type).

cPickle.c:  The Pickler and Unpickler types claim to be base classes
and gc'able, but their dealloc functions didn't call tp_free.
Repaired that.  Also call PyType_Ready() on these typeobjects, so
that the correct (PyObject_GC_Del) default memory-freeing function
gets plugged into these types' tp_free slots.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport fixes to make more types collectable.</title>
<updated>2003-05-09T18:29:21+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2003-05-09T18:29:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d8136b500a73eb48ba2e122c3f8e0fb858218c9e'/>
<id>d8136b500a73eb48ba2e122c3f8e0fb858218c9e</id>
<content type='text'>
classmethod, staticmethod, cPickle.Pickler, cPickle.UNpickler
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
classmethod, staticmethod, cPickle.Pickler, cPickle.UNpickler
</pre>
</div>
</content>
</entry>
<entry>
<title>fsync():  Implemented for Windows, via calling MS _commit.  This counts</title>
<updated>2003-04-23T20:14:12+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-04-23T20:14:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=c18cc56c2115dad6a118097d0fd722428364b4d2'/>
<id>c18cc56c2115dad6a118097d0fd722428364b4d2</id>
<content type='text'>
as "a bug" because there's no other way in core Python to ensure that
bytes written are actually on disk.  At least ZODB wants this guarantee,
for robustness against crashes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as "a bug" because there's no other way in core Python to ensure that
bytes written are actually on disk.  At least ZODB wants this guarantee,
for robustness against crashes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport reference leak fix from HEAD revision 1.79.</title>
<updated>2003-04-09T18:19:24+00:00</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2003-04-09T18:19:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d065a13a96428c8b6cc2809aed9ab2ec08c9d8d5'/>
<id>d065a13a96428c8b6cc2809aed9ab2ec08c9d8d5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed the gc-vs-__del__ bugs for new-style classes.  That's it for this one.</title>
<updated>2003-04-08T20:33:05+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-04-08T20:33:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=8998a819375d8aa439e560472edcee9d9fa5475c'/>
<id>8998a819375d8aa439e560472edcee9d9fa5475c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>More backporting of gc-vs-__del__ fixes.  It should be fixed for instances</title>
<updated>2003-04-08T19:13:14+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-04-08T19:13:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=539afe0d8412551503e75b20a1f010560aa5fbc1'/>
<id>539afe0d8412551503e75b20a1f010560aa5fbc1</id>
<content type='text'>
of classic classes now.  Alas, new-style classes are still a problem, and
didn't need to be fixed in 2.3 (they were already immune in 2.3 due to the
new-in-2.3 tp_del slot).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of classic classes now.  Alas, new-style classes are still a problem, and
didn't need to be fixed in 2.3 (they were already immune in 2.3 due to the
new-in-2.3 tp_del slot).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory corruption in garbage collection.</title>
<updated>2003-04-03T23:02:29+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2003-04-03T23:02:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f95350079cb0e93c57709b1166f969505dfd33a1'/>
<id>f95350079cb0e93c57709b1166f969505dfd33a1</id>
<content type='text'>
The move_finalizers() routine checks each object in the unreachable
list to see if it has a finalizer.  If it does, it is moved to the
finalizers list.  The collector checks by calling, effectively,
hasattr(obj, "__del__").  The hasattr() call can result in an
arbitrary amount of Python code being run, because it will invoke
getattr hooks on obj.

If a getattr() hook is run from move_finalizers(), it may end up
resurrecting or deallocating objects in the unreachable list.  In
fact, it's possible that the hook causes the next object in the list
to be deallocated.  That is, the object pointed to by gc-&gt;gc.gc_next
may be freed before has_finalizer() returns.

The problem with the previous revision is that it followed
gc-&gt;gc.gc_next before calling has_finalizer().  If has_finalizer()
gc-&gt;happened to deallocate the object FROM_GC(gc-&gt;gc.gc_next), then
the next time through the loop gc would point to freed memory.  The
fix is to always follow the next pointer after calling
has_finalizer().

Note that Python 2.3 does not have this problem, because
has_finalizer() checks the tp_del slot and never runs Python code.

Tim, Barry, and I peed away the better part of two days tracking this
down.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The move_finalizers() routine checks each object in the unreachable
list to see if it has a finalizer.  If it does, it is moved to the
finalizers list.  The collector checks by calling, effectively,
hasattr(obj, "__del__").  The hasattr() call can result in an
arbitrary amount of Python code being run, because it will invoke
getattr hooks on obj.

If a getattr() hook is run from move_finalizers(), it may end up
resurrecting or deallocating objects in the unreachable list.  In
fact, it's possible that the hook causes the next object in the list
to be deallocated.  That is, the object pointed to by gc-&gt;gc.gc_next
may be freed before has_finalizer() returns.

The problem with the previous revision is that it followed
gc-&gt;gc.gc_next before calling has_finalizer().  If has_finalizer()
gc-&gt;happened to deallocate the object FROM_GC(gc-&gt;gc.gc_next), then
the next time through the loop gc would point to freed memory.  The
fix is to always follow the next pointer after calling
has_finalizer().

Note that Python 2.3 does not have this problem, because
has_finalizer() checks the tp_del slot and never runs Python code.

Tim, Barry, and I peed away the better part of two days tracking this
down.
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch #695250: Suppress COPYRIGHT if site.py is not read. Fixes #672614.</title>
<updated>2003-03-30T17:00:58+00:00</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2003-03-30T17:00:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=fa8b672c2a0a603b19c9f0b696186a67ef647e9a'/>
<id>fa8b672c2a0a603b19c9f0b696186a67ef647e9a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
