php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35740 memory leak when including a directory
Submitted: 2005-12-20 09:30 UTC Modified: 2005-12-20 10:48 UTC
From: david at tulloh dot id dot au Assigned: tony2001 (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5.1.1 OS: Debian Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: david at tulloh dot id dot au
New email:
PHP Version: OS:

 

 [2005-12-20 09:30 UTC] david at tulloh dot id dot au
Description:
------------
Including a directory causes a memory leak.  While it's obviously bad and should fail, the memory leak was a surprise.

Reproduce code:
---------------
> php -r '@include("./");'
php-5.1.1/main/fopen_wrappers.c(539) :  Freeing 0x08373750 (49 bytes), script=-
=== Total 1 memory leaks detected ===

> php -r '@include("/");'
php-5.1.1/main/fopen_wrappers.c(539) :  Freeing 0x083735E8 (2 bytes), script=-
=== Total 1 memory leaks detected ===

> php -r '@include(".");'
php-5.1.1/main/fopen_wrappers.c(539) :  Freeing 0x08373790 (49 bytes), script=-
Last leak repeated 1 time
=== Total 2 memory leaks detected ===




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-20 10:48 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC