Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37284 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27463 invoked from network); 29 Apr 2008 08:08:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 08:08:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:43356] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/1B-04029-497D6184 for ; Tue, 29 Apr 2008 04:08:53 -0400 Received: from [192.168.3.91] (unknown [212.42.62.198]) by daylessday.org (Postfix) with ESMTP id B424D6400F2; Tue, 29 Apr 2008 12:08:49 +0400 (MSD) Message-ID: <4816D78B.2000402@daylessday.org> Date: Tue, 29 Apr 2008 12:08:43 +0400 User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Gregory Beaver CC: internals Mailing List References: <48168FAD.7030207@chiaraquartet.net> In-Reply-To: <48168FAD.7030207@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] major bug in mmap of lexer From: tony@daylessday.org (Antony Dovgal) On 29.04.2008 07:02, Gregory Beaver wrote: > Hi, > > Today while testing phar with phpMyAdmin, I was getting a really weird > error - one of the files was turning into a series of Z's, munging the > entire display. Thinking it was a phar issue, I instead tracked it down > to a major problem in an edge case of zend_stream_fixup(). For files > that are about 4085 bytes long, the buffer containing them was being > erealloc()ed without re-assigning the new value to the zend_file_handle, > resulting in efreed() value filled with Z's if --enable-debug was in the > configure line (whew). A simple order change of assignment solves this one. > > The attached patches against 5_3 and HEAD fixes this and saves the day > for pharred phpMyAdmin. The patch makes perfect sense. Committed, thanks. -- Wbr, Antony Dovgal