[issue21627] Concurrently closing files and iterating over the open files directory is not well specified
Dan Snider
report at bugs.python.org
Fri Sep 17 14:53:06 EDT 2021
Dan Snider <mr.assume.away at gmail.com> added the comment:
On Android, if os.close_range closes the file descriptor of the scandir iterator, the interpreter immediately crashes eg:
>>> import os
>>> os.scandir()
<posix.ScandirIterator object at 0x7082d6ef10>
>>> os.closerange(3,9999)
fdsan: attempted to close file descriptor 3, expected to be unowned, actually owned by DIR* 0x7263390290
Aborted
$
Sorry if this isn't an appropriate place to add this, but the title matched the concept I think and I don't know enough to judge whether this is something that needs to be fixed.
----------
nosy: +bup
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21627>
_______________________________________
More information about the Python-bugs-list
mailing list