[Python-Dev] Another 2.5 bug candidate?

A.M. Kuchling amk at amk.ca
Sun Jul 2 18:00:44 CEST 2006


http://www.python.org/sf/1488934 argues that Python's use of fwrite()
has incorrect error checking; this most affects file.write(), but
there are other uses of fwrite() in the core.  It seems fwrite() can
return N bytes written even if an error occurred, and the code needs
to also check ferror(f->fp).

At the last sprint I tried to assemble a small test case to exhibit
the problem but failed.  The reporter's test case uses SSH, and I did
verify that Python does loop infinitely if executed under SSH, but a
test case would need to work without SSH.

Should this be fixed in 2.5?  I'm nervous about such a change to error
handling without a test case to add; maybe it'll cause problems on one
of our platforms.

--amk


More information about the Python-Dev mailing list