[issue3014] file_dealloc() assumes errno is set when EOF is returned

Antoine Pitrou report at bugs.python.org
Thu Aug 28 18:39:03 CEST 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

Selon johansen <report at bugs.python.org>:
>
> The problem is present in Python 2.4.4, the version that we're using
> here.  I'm not familiar with the versions keyword that's used here, but
> that's the version for which I'm reporting this bug.

The only changes that may be brought now to the 2.4 branch are security fixes
and nothing else. Bug fixes with a slight risk of changing legitimate behaviour
like the present one, on the other hand, will happen either on the 2.6 branch or
on the 2.7 one.

> To be clear, the problem is that when file_dealloc() sees an EOF, it
> assumes that an error has occurred.  It then checks errno.  However,
> it's possible for file_dealloc() to get an EOF under conditions where
> errno hasn't been set.  In that case, it reports an error with a stale
> value of errno.  This is explained in detail in the initial report.

You still haven't explained what the correct behaviour would be, though.
Must it report an error or not? If it must, then how should this specific error
be detected and how should the error message be phrased?

Thanks in advance.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3014>
_______________________________________


More information about the Python-bugs-list mailing list