New submission from Maxwell Bernstein <tekk.nol...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue38031>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to