Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40414 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89998 invoked from network); 9 Sep 2008 15:44:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2008 15:44:53 -0000 Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 193.227.246.108 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 193.227.246.108 ip246-108-v193.static.x-ip.net Received: from [193.227.246.108] ([193.227.246.108:48360] helo=lovelace.midden.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/74-23799-4F996C84 for ; Tue, 09 Sep 2008 11:44:53 -0400 Received: from office.vbulletin.com ([217.155.246.60] helo=[10.0.0.116]) by lovelace.midden.org.uk with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Kd5OS-0005WS-Ar; Tue, 09 Sep 2008 16:44:49 +0100 Message-ID: <48C699E2.8010401@macvicar.net> Date: Tue, 09 Sep 2008 16:44:34 +0100 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Christian Schneider CC: Arnaud Le Blanc , internals@lists.php.net, Alexey Zakhlestin References: <200809091651.55770.arnaud.lb@gmail.com> <48C697DA.2080003@cschneid.com> In-Reply-To: <48C697DA.2080003@cschneid.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -4.3 X-Spam_Report: Spam detection software, running on the system "lovelace.midden.org.uk", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Christian Schneider wrote: > Arnaud Le Blanc wrote: >> The following may (no MacOS X to test) fix the problem by returning 0 from >> zend_stream_fsize() when the file descriptor is not a regular file: >> http://arnaud.lb.s3.amazonaws.com/45928.patch > > Your patch: > +#ifdef S_ISREG > + if (!S_ISREG(buf.st_mode)) { > + return 0; > + } > +#endif > might prevent mmap-ing symbolically linked files, I'll do a quick test > when I'm at home. > Not sure if we should also check for symbolic links (and what they point > to) or if that's overkill because the performance penalty is small > enough anyway. > > Anyone from the core developers got an opinion here? > > - Chris > [...] Content analysis details: (-4.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 AWL AWL: From: address is in the auto white-list Subject: Re: [PHP-DEV] Opinion needed (bug #45928) From: scott@macvicar.net (Scott MacVicar) Christian Schneider wrote: > Arnaud Le Blanc wrote: >> The following may (no MacOS X to test) fix the problem by returning 0 from >> zend_stream_fsize() when the file descriptor is not a regular file: >> http://arnaud.lb.s3.amazonaws.com/45928.patch > > Your patch: > +#ifdef S_ISREG > + if (!S_ISREG(buf.st_mode)) { > + return 0; > + } > +#endif > might prevent mmap-ing symbolically linked files, I'll do a quick test > when I'm at home. > Not sure if we should also check for symbolic links (and what they point > to) or if that's overkill because the performance penalty is small > enough anyway. > > Anyone from the core developers got an opinion here? > > - Chris > Check for symbolic links, it could potentially come up if you have a common file. The fsize code was written and tested on a Mac but I admit I was testing with interactive mode and whole files. I can test this later on tonight if I get time and if its good I'll commit it. Scott