Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70532 invoked from network); 8 Sep 2008 13:30:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2008 13:30:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.141.85.118 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.141.85.118 uf2.search.ch Linux 2.6 Received: from [195.141.85.118] ([195.141.85.118:37533] helo=smtp.rim.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/27-58883-1E825C84 for ; Mon, 08 Sep 2008 09:30:10 -0400 Received: from localhost (localhost [127.0.0.1]) by rolig.search.ch (Postfix) with ESMTP id 004C14EA23A; Mon, 8 Sep 2008 15:30:06 +0200 (CEST) Received: from smtp.rim.ch ([127.0.0.1]) by localhost (search.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08950-06; Mon, 8 Sep 2008 15:30:02 +0200 (CEST) Received: from [192.168.1.72] (ultrafilter2-i [192.168.85.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rolig.search.ch (Postfix) with ESMTP id 563A14EA211; Mon, 8 Sep 2008 15:30:02 +0200 (CEST) Message-ID: <48C528D9.3030608@cschneid.com> Date: Mon, 08 Sep 2008 15:30:01 +0200 User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: jani.taskinen@iki.fi CC: internals Mailing List References: <48C3BC03.7060004@sci.fi> In-Reply-To: <48C3BC03.7060004@sci.fi> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at search.ch Subject: Re: Critical bugs to fix before ANY release From: cschneid@cschneid.com (Christian Schneider) Jani Taskinen wrote: > There are some bugs that have to be fixed before any actual release can > be even dreamed of: > http://bugs.php.net/search.php?cmd=display&status=Critical > > Note that 2 of those even have patches attached to fix them.. I had a quick look at bug http://bugs.php.net/bug.php?id=45928 and found the problem to be in Zend/zend_stream.c function zend_stream_fsize(): It uses fstat() to determine the filesize which on MacOS X for pipes returns either 0 (my interpretation: no data from the pipe ready yet) or a number up to 16384 (my interpretation: data from the pipe ready but the maximum buffer size is 16k). I see several solutions but I'm not sure which is the desired one: - return 0 (size unknown) if the file is a pipe (or socket, ...) - return 0 if the file is not a regular file (or symlink, dir?) - look into a way of determining EOF reached As a quick test I changed return buf.st_size; in function zend_stream_fsize() to return 0; and cat 30k.php | php worked after that. - Chris