Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25729 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29507 invoked by uid 1010); 16 Sep 2006 11:36:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29492 invoked from network); 16 Sep 2006 11:36:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2006 11:36:05 -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.25 cause and error) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.25 relay5.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.25] ([212.55.154.25:55977] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/35-23155-3A1EB054 for ; Sat, 16 Sep 2006 07:36:03 -0400 Received: (qmail 28033 invoked from network); 16 Sep 2006 11:35:59 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.152) by relay6 with SMTP; 16 Sep 2006 11:35:59 -0000 Received: (qmail 9931 invoked from network); 16 Sep 2006 11:35:59 -0000 X-AntiVirus: PTMail-AV 0.3-0.88.4 X-Virus-Status: Clean (0.00545 seconds) Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[82.155.74.190]) (envelope-sender ) by mta2 (qmail-ldap-1.03) with SMTP for ; 16 Sep 2006 11:35:59 -0000 Message-ID: <005701c6d984$49c64980$0100a8c0@pc07653> To: "PHPdev" Date: Sat, 16 Sep 2006 12:35:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original 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: leaks related with virtual_file_ex() From: nlopess@php.net ("Nuno Lopes") 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