[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

Davide Rizzo report at bugs.python.org
Tue Jul 12 19:14:34 CEST 2011


Davide Rizzo <sorcio at gmail.com> added the comment:

The attached test segfaults (and passes with the patch). It wasn't clear to me where to put the test (it is a typeobject issue triggered by io) but Antoine on IRC agreed it would make sense to add it to test_io anyway.

Python 2.7 is affected too by the bug, but it doesn't trigger with _PyIOBase_finalize because it first checks for "closed" but the lookup fails (not sure why) so it doesn't try to call "close". On Python 3.3 the lookup for "closed" returned a valid descriptor from the method cache even after the type is cleared.

----------
versions: +Python 2.7
Added file: http://bugs.python.org/file22635/test_io.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12149>
_______________________________________


More information about the Python-bugs-list mailing list