[issue14241] io.UnsupportedOperation.__new__(io.UnsupportedOperation) fails

Mark Shannon report at bugs.python.org
Sat Jul 7 16:03:22 CEST 2012


Mark Shannon <mark at hotpy.org> added the comment:

>>> io.UnsupportedOperation.__new__(io.UnsupportedOperation)
behaves correctly now (rev d9c98730e2e8)

This bug was (I believe) caused somehow by an error in OSError_new() which did not initialize self->args if OSError_init() was not called.

Here is a crash which exploited the lack of initialization:
(Works on rev 2a142141e5fd)

>>> class C(ValueError, OSError):pass
... 
>>> c = OSError.__new__(C)
>>> str(c)
Segmentation fault (core dumped)

This has already been fixed, so I'm closing this issue.

----------
assignee:  -> eric.araujo
components: +Distutils2 -Interpreter Core
nosy: +alexis, tarek
resolution:  -> fixed
status: open -> closed

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


More information about the Python-bugs-list mailing list