[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file
Antoine Pitrou
report at bugs.python.org
Tue Feb 2 15:51:51 CET 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
> An errno+ferror approach works except for two cases:
>
> (1) MS fgets() does not consider reading from a write-only stream
> an error. While annoying, I think this is standard conforming.
>
> (2) OpenSolaris sets errno unreliably after getc.
>
>
> I do not know how to get around those without using OS specifics.
Ok, then perhaps it's better to have some internal {readable, writable}
flags based on the original mode string.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5677>
_______________________________________
More information about the Python-bugs-list
mailing list