Mercurial > cpython-lru_cache-weakref
diff Objects/typeobject.c @ 53374:2e37190f8ea7
Merged revisions 71860 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71860 | benjamin.peterson | 2009-04-24 19:41:22 -0500 (Fri, 24 Apr 2009) | 1 line
fix a segfault when setting __class__ in __del__ #5283
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 25 Apr 2009 01:08:45 +0000 |
| parents | 3ab2e52d8d19 |
| children | 2993f049e2c9 |
line wrap: on
line diff
--- a/Objects/typeobject.c Fri Apr 24 23:26:21 2009 +0000 +++ b/Objects/typeobject.c Sat Apr 25 01:08:45 2009 +0000 @@ -877,6 +877,9 @@ assert(base); } + /* Extract the type again; tp_del may have changed it */ + type = Py_TYPE(self); + /* Call the base tp_dealloc() */ assert(basedealloc); basedealloc(self); @@ -958,6 +961,9 @@ } } + /* Extract the type again; tp_del may have changed it */ + type = Py_TYPE(self); + /* Call the base tp_dealloc(); first retrack self if * basedealloc knows about gc. */
