Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40412 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87284 invoked from network); 9 Sep 2008 15:36:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2008 15:36:07 -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.117 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.141.85.117 uf1.search.ch Linux 2.6 Received: from [195.141.85.117] ([195.141.85.117:46059] helo=smtp.rim.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/C3-23799-3E796C84 for ; Tue, 09 Sep 2008 11:36:04 -0400 Received: from localhost (localhost [127.0.0.1]) by rolig.search.ch (Postfix) with ESMTP id D707B4EBE87; Tue, 9 Sep 2008 17:36:00 +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 02881-05; Tue, 9 Sep 2008 17:35:55 +0200 (CEST) Received: from [192.168.1.72] (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rolig.search.ch (Postfix) with ESMTP id EF1D34EBB73; Tue, 9 Sep 2008 17:35:54 +0200 (CEST) Message-ID: <48C697DA.2080003@cschneid.com> Date: Tue, 09 Sep 2008 17:35:54 +0200 User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: Arnaud Le Blanc CC: internals@lists.php.net, Alexey Zakhlestin References: <200809091651.55770.arnaud.lb@gmail.com> In-Reply-To: <200809091651.55770.arnaud.lb@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at search.ch Subject: Re: [PHP-DEV] Opinion needed (bug #45928) From: cschneid@cschneid.com (Christian Schneider) 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