#35740 [NEW]: memory leak when including a directory
From: david at tulloh dot id dot au
Operating system: Debian Linux
PHP version: 5.1.1
PHP Bug Type: Filesystem function related
Bug description: memory leak when including a directory
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 ===
--
Edit bug report at http://bugs.php.net/?id=35740&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35740&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35740&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35740&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35740&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35740&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35740&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35740&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35740&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35740&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35740&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35740&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35740&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35740&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35740&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35740&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35740&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35740&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35740&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35740&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35740&r=mysqlcfg
Thread (3 messages)
- david at tulloh dot id dot au