Edit report at https://bugs.php.net/bug.php?id=65395&edit=1
ID: 65395 Updated by: s...@php.net Reported by: naitik dot dani at gmail dot com Summary: Memory leak in TSRM.c -Status: Open +Status: Feedback Type: Bug Package: *General Issues Operating System: Freebsd PHP Version: 5.3.25 Block user comment: N Private report: N New Comment: How did you configure PHP and what is the testcase that reproduces the problem? Previous Comments: ------------------------------------------------------------------------ [2013-08-05 15:10:18] naitik dot dani at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=65395&edit=1