Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71581 invoked by uid 1010); 17 Sep 2006 12:03:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71566 invoked from network); 17 Sep 2006 12:03:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2006 12:03:08 -0000 Authentication-Results: pb1.pair.com header.from=nlopess@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=nlopess@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 212.55.154.21 cause and error) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.21 relay1.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.21] ([212.55.154.21:52009] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/04-36085-A793D054 for ; Sun, 17 Sep 2006 08:03:06 -0400 Received: (qmail 4989 invoked from network); 17 Sep 2006 12:03:03 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.154) by relay1 with SMTP; 17 Sep 2006 12:03:03 -0000 Received: (qmail 27968 invoked from network); 17 Sep 2006 12:03:03 -0000 X-AntiVirus: PTMail-AV 0.3-0.88.4 X-Virus-Status: Clean (0.00668 seconds) Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[82.155.75.54]) (envelope-sender ) by mta4 (qmail-ldap-1.03) with SMTP for ; 17 Sep 2006 12:03:03 -0000 Message-ID: <006c01c6da51$3a51bfc0$0100a8c0@pc07653> To: "Nuno Lopes" , "PHPdev" References: <005701c6d984$49c64980$0100a8c0@pc07653> Date: Sun, 17 Sep 2006 13:03:01 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Subject: Re: [PHP-DEV] leaks related with virtual_file_ex() From: nlopess@php.net ("Nuno Lopes") OK, first patch to fix the 'tests/lang/bug35176.phpt' specific problem: http://mega.ist.utl.pt/~ncpl/zend_include_memleak.txt There might be other issues with virtual_file_ex() that I haven't fully tested. Nuno ----- Original Message ----- From: "Nuno Lopes" To: "PHPdev" Sent: Saturday, September 16, 2006 12:35 PM Subject: [PHP-DEV] leaks related with virtual_file_ex() > Hello, > > There are some leaks in PHP associated with virtual_file_ex() usage. > The problem is that that function doesn't free the new 'cwd' on error > (path not found). > > Taking a look at http://lxr.php.net/ident?i=virtual_file_ex we can see the > function usage. For example, expand_filepath() free()s the cwd on failure, > while ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER() doesn't. > > > I'm not sure if you want virtual_file_ex() to clean the cwd itself, or > leave that responsibility to the caller, but we should define the > convention and patch the relevant places (and fix those mem leaks). > > One test that triggers the problem is: tests/lang/bug35176.phpt > > > Nuno