This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix failure to cleanup input-only stream buffers in preparation for BZ#16734 fix

On 02/16/2015 08:07 PM, Paul Pluzhnikov wrote:
> bz16734-cleanup.patch2.txt
> diff --git a/libio/genops.c b/libio/genops.c
> index 6612997..094598f 100644
> --- a/libio/genops.c
> +++ b/libio/genops.c
> @@ -950,8 +950,6 @@ _IO_unbuffer_write (void)
>    for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
>      {
>        if (! (fp->_flags & _IO_UNBUFFERED)
> -	  && (! (fp->_flags & _IO_NO_WRITES)
> -	      || (fp->_flags & _IO_IS_APPENDING))
>  	  /* Iff stream is un-orientated, it wasn't used. */
>  	  && fp->_mode != 0)
>  	{

I know you already committed this, but I wanted to mention that
I just reviewed this and it looks OK to me.

It would have been nice to have added a specific test case to
catch this instead of relying on other orthogonal test cases.
Please still consider adding a test case for this specific

I had a lot of difficulty untying the POSIX stream, and fd
requirements the last time I touched this code, and Siddhesh
helped write several more key regression tests to encode
the expectations we had as seen in [1][2]. While that is not
relevant here, what is relevant is making sure we have good
and clear regression test coverage.


[2] "2.5.1 Interaction of File Descriptors and Standard I/O Streams"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]