From: msisolak at yahoo dot com
Operating system: Windows 2000
PHP version: 5.0.0RC1
PHP Bug Type: Zend Engine 2 problem
Bug description: memory leak of registered_zend_ini_directives table
Description:
------------
Under thread-safe builds the registered_zend_ini_directives hash table
leaks (verified under Win32 with a _CrtDumpMemoryLeaks() call at the
bottom of the CLI main() function). There is a zend_ini_global_shutdown()
function in zend_ini.c to free this table, but it never gets called.
A suggested patch:
--- main.c.orig Thu Mar 18 16:34:09 2004
+++ main.c Thu Mar 18 16:34:22 2004
@@ -1523,9 +1523,9 @@
/* close down the ini config */
php_shutdown_config();
+ zend_ini_global_shutdown(TSRMLS_C);
#ifndef ZTS
- zend_ini_shutdown(TSRMLS_C);
shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC);
#endif
Since registered_zend_ini_directives is the same as EG(ini_directives)
under non-thread safe builds, calling zend_ini_global_shutdown() in either
case should be fine.
Reproduce code:
---------------
Just calling "php.exe -v" caused the memory leak - no script is required.
--
Edit bug report at http://bugs.php.net/?id=27640&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27640&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27640&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27640&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27640&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27640&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27640&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27640&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27640&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27640&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27640&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27640&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27640&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27640&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27640&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27640&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27640&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27640&r=float