[issue38031] FileIO.__init__ aborts when opener returns bad fd
Maxwell Bernstein
report at bugs.python.org
Wed Sep 4 17:19:41 EDT 2019
New submission from Maxwell Bernstein <tekk.nolagi at gmail.com>:
On a debug build, the following causes an abort:
import _io
_io.FileIO("foobar", opener=lambda name, flags: 1000000)
1000000 is not a valid fd. FileIO attempts to raise an IOError from errno, but there is already an exception set when PyErr_SetFromErrno uses PyObject_Call to create the exception.
----------
components: IO
messages: 351150
nosy: tekknolagi
priority: normal
severity: normal
status: open
title: FileIO.__init__ aborts when opener returns bad fd
type: crash
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38031>
_______________________________________
More information about the Python-bugs-list
mailing list