From: naitik dot dani at gmail dot com Operating system: Freebsd PHP version: 5.5.1 Package: *General Issues Bug Type: Bug Bug description:Memory leak in TSRM.c
Description: ------------ I am seeing the following backtrace in the memory plumber output which points that there is a memory leak with respect to tsrm_tls_entry in TSRM.c file: ==165== at 0x80395a890: __zend_realloc (php-5.3.25/Zend/zend_alloc.h:112) ==165== at 0x80395c7ef: _zend_hash_quick_add_or_update (php- 5.3.25/Zend/zend_hash.c:337) ==165== at 0x80395cb71: zend_hash_copy (php-5.3.25/Zend/zend_hash.c:788) ==165== at 0x80394c269: compiler_globals_ctor (php-5.3.25/Zend/zend.c:506) ==165== at 0x8038e65ca: allocate_new_resource (php-5.3.25/TSRM/TSRM.c:294) ==165== at 0x8038e6709: ts_resource_ex (php-5.3.25/TSRM/TSRM.c:361) ==165== at 0x8039e29f1: php_handler (php- 5.3.25/sapi/apache2handler/sapi_apache2.c:548) I am using PHP 5.3.25 version. I looked for the patch release after this one that might have a fix for it, but I couldn't find one. I would appreciate if you can throw some light on this memory leak to help me fix it. I cannot upgrade to new PHP version due to some inhouse roadblocks. However I can patch it to fix this memory leak. Thanks in advance. Actual result: -------------- ==165== at 0x80395a890: __zend_realloc (php-5.3.25/Zend/zend_alloc.h:112) ==165== at 0x80395c7ef: _zend_hash_quick_add_or_update (php- 5.3.25/Zend/zend_hash.c:337) ==165== at 0x80395cb71: zend_hash_copy (php-5.3.25/Zend/zend_hash.c:788) ==165== at 0x80394c269: compiler_globals_ctor (php-5.3.25/Zend/zend.c:506) ==165== at 0x8038e65ca: allocate_new_resource (php-5.3.25/TSRM/TSRM.c:294) ==165== at 0x8038e6709: ts_resource_ex (php-5.3.25/TSRM/TSRM.c:361) ==165== at 0x8039e29f1: php_handler (php- 5.3.25/sapi/apache2handler/sapi_apache2.c:548) -- Edit bug report at https://bugs.php.net/bug.php?id=65395&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65395&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65395&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65395&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65395&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65395&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65395&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65395&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65395&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65395&r=support Expected behavior: https://bugs.php.net/fix.php?id=65395&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65395&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65395&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65395&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65395&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65395&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65395&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65395&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65395&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65395&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65395&r=mysqlcfg