]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Allocating a new weakref object can cause existing weakref objects for
authorFred Drake <fdrake@acm.org>
Wed, 4 Feb 2004 23:13:43 +0000 (23:13 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 4 Feb 2004 23:13:43 +0000 (23:13 +0000)
commit74788b6af49011be30c95ad2e7ae98ca95138bde
tree6dd4d2f0d6422321e517e6c6e49124ac19178540
parentbf96e061a8ae7f755638499b87ff72c4943cdbd8
Allocating a new weakref object can cause existing weakref objects for
the same object to be collected by the cyclic GC support if they are
only referenced by a cycle.  If the weakref being collected was one of
the weakrefs without callbacks, some local variables for the
constructor became invalid and have to be re-computed.

The test caused a segfault under a debug build without the fix applied.
Lib/test/test_weakref.py
Objects/weakrefobject.c