Re: cvs: php-src /main/streams streams.c

From: Date: Thu, 07 Apr 2005 19:01:14 +0000
Subject: Re: cvs: php-src /main/streams streams.c
References: 1 2 3 4  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-31285@lists.php.net to get a copy of this message
    Should Antony revert his patch then..?
    (wasn't Wez basically saying that? :)
    --Jani
On Wed, 6 Apr 2005, Ilia Alshanetsky wrote:
I checked the code with valgrind and it seems to me like the problem lies else where. According to valgrind (at some point, probably the last line) we have a Conditional jump or move depends on uninitialised value(s) php_stream_get_record (/php5/main/streams/streams.c:847) Ilia Antony Dovgal wrote:
On Wed, 6 Apr 2005 09:05:35 -0400 Wez Furlong <kingwez@gmail.com> wrote:
What problem does this fix? EOF can be a temporary condition for network streams, depending on non-blocking status, and the read call is used to re-enable it. (yay for backward compatibility).
stream_get_line() gives a lot of garbage trying to read after EOF and segfaults with this code: <? $fp = fopen(dirname(__FILE__)."/test.txt", 'r'); while ($data = stream_get_line($fp, 100, "|")) {
    var_dump($data);
} ?> test.txt contents: ------- line1 | some | another -------


« previous php.cvs (#31285) next »