Re: cvs: php-src /main/streams streams.c
| From: | Wez Furlong | Date: | Mon, 23 May 2005 15:31:05 +0000 |
| Subject: | Re: cvs: php-src /main/streams streams.c | ||
| References: | 1 2 3 4 5 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-31979@lists.php.net to get a copy of this message | ||
30441 sounds like a bogus bug report because no one can reproduce what
that guy is seeing.
29023 sounds like a valid bug.
32649 is a db2 bug report ;)
32810 is a bug, but that's because tmpfile() is implemented as a
wrapper-less plain file.
(The|a) correct fix for 32810 is to tag the stream with the
plain_files_wrapper in _php_stream_fopen_tmpfile().
The others need further investigation.
Please revert your commit, because it breaks a *lot* more stuff than it fixes.
Greedy reads for local files are only really around for BC reasons
(that nasty fread(, filesize()) thing).
--Wez.
On 5/23/05, Antony Dovgal <antony@zend.com> wrote:
> On Mon, 23 May 2005 10:08:39 -0400
> Wez Furlong <kingwez@gmail.com> wrote:
>
> > What tests did you run, and what problem were you trying to solve?
> >
> > You've made reads non-greedy for streams with wrappers (except for
> > plain files), and made reads greedy for streams without wrappers.
> >
> > The correct semantic is: only reads on local files should be greedy
> > (for BC); everything else should not.
>
> So, you're trying to say that #30441, #29023, #32649 and #32810 are bogus bugs?
> Because from what I can see they are caused by exactly this "non-greediness".
>
>
> > On 5/23/05, Antony Dovgal <antony@zend.com> wrote:
> > > On Mon, 23 May 2005 09:54:44 -0400
> > > Wez Furlong <kingwez@gmail.com> wrote:
> > >
> > > > WTF!???
> > > >
> > > > Please revert, immediately.
> > >
> > > Please care to explain why.
> > > I tested it with all kinds of wrappers and it works fine for me.
> > >
> > > > On 5/23/05, Antony Dovgal <tony2001@php.net> wrote:
> > > > > tony2001 Mon May 23 07:51:53 2005 EDT
> > > > >
> > > > > Modified files:
> > > > > /php-src/main/streams streams.c
> > > > > Log:
> > > > > fix bug #32810 (fread after tmpfile() reads only 8192 bytes)
> > > > >
> > > > >
> > > > >
> > > > > http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1..78&r2=1.79&ty=u
> > > > > Index: php-src/main/streams/streams.c
> > > > > diff -u php-src/main/streams/streams.c:1.78
> > > > > php-src/main/streams/streams.c:1.79
> > > > > --- php-src/main/streams/streams.c:1.78 Mon May 16 04:37:13 2005
> > > > > +++ php-src/main/streams/streams.c Mon May 23 07:51:53 2005
> > > > > @@ -19,7 +19,7 @@
> > > > >
> > > > > +----------------------------------------------------------------------+
> > > > > */
> > > > >
> > > > > -/* $Id: streams.c,v 1.78 2005/05/16 08:37:13 tony2001 Exp $ */
> > > > > +/* $Id: streams.c,v 1.79 2005/05/23 11:51:53 tony2001 Exp $ */
> > > > >
> > > > > #define _GNU_SOURCE
> > > > > #include "php.h"
> > > > > @@ -603,8 +603,9 @@
> > > > > }
> > > > >
> > > > > /* just break anyway, to avoid greedy read */
> > > > > - if (stream->wrapper != &php_plain_files_wrapper)
> > > > > + if (stream->wrapper != NULL &&
> > > > > stream->wrapper != &php_plain_files_wrapper) {
> > > > > break;
> > > > > + }
> > > > > }
> > > > >
> > > > > if (didread > 0) {
> > > > >
> > > > > --
> > > > > PHP CVS Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit:
> > > > > http://www.php.net/unsub.php
> > > > >
> > > > >
> > >
> > >
> > > --
> > > Wbr,
> > > Antony Dovgal aka tony2001
> > > antony@zend.com
> > >
> >
>
>
> --
> Wbr,
> Antony Dovgal aka tony2001
> antony@zend.com
>