php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61360 valgrind complain of mem leak
Submitted: 2012-03-12 14:38 UTC Modified: 2013-05-12 13:02 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: laruence@php.net Assigned: ab (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.4.0 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laruence@php.net
New email:
PHP Version: OS:

 

 [2012-03-12 14:38 UTC] laruence@php.net
Description:
------------
when run 5.4+APC with USE_ZEND_ALLOC=0

valgrind complain mem leaks

plz note I run the test script in this way:

$USE_ZEND_ALLOC=0 valgrind --leak-check=full php54 -S `hostname`:8964 

and the test script should be index.php

Test script:
---------------
<?php

$there = 'world';

class hello
{
    function __construct($p)
    {   
        $this->testme($p);
    }   

    function testme($p)
    {   
        echo "testme $p <br>";
    }   
}

$h = new hello($there);

Expected result:
----------------
no mem leak

Actual result:
--------------
==24793== 
==24793== HEAP SUMMARY:
==24793==     in use at exit: 3,636,679 bytes in 22,636 blocks
==24793==   total heap usage: 28,009 allocs, 5,373 frees, 4,348,865 bytes 
allocated
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 27 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8F0B269: apc_pthreadmutex_create (apc_pthreadmutex.c:30)
==24793==    by 0x8F0BC00: apc_sma_init (apc_sma.c:382)
==24793==    by 0x8F0A8C1: apc_module_init (apc_main.c:805)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 28 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8F0B269: apc_pthreadmutex_create (apc_pthreadmutex.c:30)
==24793==    by 0x8F006B6: apc_cache_create (apc_cache.c:301)
==24793==    by 0x8F0A8EB: apc_module_init (apc_main.c:809)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 29 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8F0B269: apc_pthreadmutex_create (apc_pthreadmutex.c:30)
==24793==    by 0x8F006C7: apc_cache_create (apc_cache.c:303)
==24793==    by 0x8F0A8EB: apc_module_init (apc_main.c:809)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 30 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8F0B269: apc_pthreadmutex_create (apc_pthreadmutex.c:30)
==24793==    by 0x8F006B6: apc_cache_create (apc_cache.c:301)
==24793==    by 0x8F0A922: apc_module_init (apc_main.c:810)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 31 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8F0B269: apc_pthreadmutex_create (apc_pthreadmutex.c:30)
==24793==    by 0x8F006C7: apc_cache_create (apc_cache.c:303)
==24793==    by 0x8F0A922: apc_module_init (apc_main.c:810)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 32 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8F0B269: apc_pthreadmutex_create (apc_pthreadmutex.c:30)
==24793==    by 0x8F14DBD: apc_interned_strings_init (apc_string.c:204)
==24793==    by 0x8F0AA65: apc_module_init (apc_main.c:845)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 4 bytes in 1 blocks are definitely lost in loss record 33 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8712F8: _emalloc (zend_alloc.c:2423)
==24793==    by 0x8F0CC29: apc_php_malloc (apc_zend.c:38)
==24793==    by 0x8F0E9F6: apc_unpool_alloc (apc_pool.c:91)
==24793==    by 0x8F0F0B6: apc_pmemcpy (apc_pool.c:492)
==24793==    by 0x8F07CDB: apc_copy_op_array_for_execution (apc_compile.c:1657)
==24793==    by 0x8F095F6: cached_compile (apc_main.c:373)
==24793==    by 0x8F09DA1: my_compile_file (apc_main.c:552)
==24793==    by 0x6AF935: phar_compile_file (phar.c:3391)
==24793==    by 0x8A3B21: zend_execute_scripts (zend.c:1264)
==24793==    by 0x8239FC: php_execute_script (main.c:2473)
==24793==    by 0x9D06F2: php_cli_server_dispatch_script (php_cli_server.c:1875)
==24793== 
==24793== 32 bytes in 1 blocks are definitely lost in loss record 2,830 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8712F8: _emalloc (zend_alloc.c:2423)
==24793==    by 0x8F08A54: apc_register_serializer (apc_serializer.h:62)
==24793==    by 0x8F0A9D9: apc_module_init (apc_main.c:820)
==24793==    by 0x8EFC131: zm_startup_apc (php_apc.c:347)
==24793==    by 0x8AA9DE: zend_startup_module_ex (zend_API.c:1656)
==24793==    by 0x8B48BA: zend_hash_apply (zend_hash.c:716)
==24793==    by 0x8AAE9B: zend_startup_modules (zend_API.c:1783)
==24793==    by 0x8233E4: php_module_startup (main.c:2191)
==24793==    by 0x9CC1DA: sapi_cli_server_startup (php_cli_server.c:416)
==24793==    by 0x9C7199: main (php_cli.c:1336)
==24793== 
==24793== 1,738 (8 direct, 1,730 indirect) bytes in 1 blocks are definitely lost 
in loss record 8,314 of 8,544
==24793==    at 0x4906ADE: malloc (vg_replace_malloc.c:263)
==24793==    by 0x8712F8: _emalloc (zend_alloc.c:2423)
==24793==    by 0x8F0CC29: apc_php_malloc (apc_zend.c:38)
==24793==    by 0x8F08DF9: install_class (apc_main.c:168)
==24793==    by 0x8F09518: cached_compile (apc_main.c:357)
==24793==    by 0x8F09DA1: my_compile_file (apc_main.c:552)
==24793==    by 0x6AF935: phar_compile_file (phar.c:3391)
==24793==    by 0x8A3B21: zend_execute_scripts (zend.c:1264)
==24793==    by 0x8239FC: php_execute_script (main.c:2473)
==24793==    by 0x9D06F2: php_cli_server_dispatch_script (php_cli_server.c:1875)
==24793==    by 0x9D178C: php_cli_server_dispatch (php_cli_server.c:2036)
==24793==    by 0x9D1DC7: php_cli_server_recv_event_read_request 
(php_cli_server.c:2214)
==24793== 
==24793== LEAK SUMMARY:
==24793==    definitely lost: 68 bytes in 9 blocks
==24793==    indirectly lost: 1,730 bytes in 15 blocks
==24793==      possibly lost: 0 bytes in 0 blocks
==24793==    still reachable: 3,634,881 bytes in 22,612 blocks
==24793==         suppressed: 0 bytes in 0 blocks
==24793== Reachable blocks (those to which a pointer was found) are not shown.
==24793== To see them, rerun with: --leak-check=full --show-reachable=yes
==24793== 
==24793== For counts of detected and suppressed errors, rerun with: -v
==24793== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 4 from 4)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-12 16:24 UTC] ab@php.net
The bug seems to happen only when phar is present, debugging without phar gives 
no errors. Need on further investigation.
 [2012-03-12 16:24 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2012-03-13 02:40 UTC] laruence@php.net
the php is built without ZTS,  why there comes a "apc_pthreadmutex_create" ? :)
 [2012-03-14 09:17 UTC] pajoye@php.net
@laruence 
This is for the locking mechanism in APC, nothing to do with TSRM or such. The 
cache memory management requires it, an entry could be concurrently updated.
 [2012-07-17 12:39 UTC] ab@php.net
Automatic comment from SVN on behalf of ab
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=326665
Log: Fixed valgrind complains about rwlock as reported in bug #61360
 [2012-07-17 12:50 UTC] ab@php.net
The rwlock stuff is disappeared now, the current trace looks


==30284== 
==30284== HEAP SUMMARY:
==30284==     in use at exit: 6,504,206 bytes in 18,242 blocks
==30284==   total heap usage: 27,870 allocs, 9,628 frees, 17,965,630 bytes 
allocated
==30284== 
==30284== 8 bytes in 2 blocks are possibly lost in loss record 267 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CBB8D5: apc_pmemcpy (apc_pool.c:492)
==30284==    by 0x4CB3FEB: apc_copy_op_array_for_execution (apc_compile.c:1657)
==30284==    by 0x4CB40EC: apc_copy_function_for_execution (apc_compile.c:1674)
==30284==    by 0x4CB4134: apc_copy_function_for_execution_ex 
(apc_compile.c:1683)
==30284==    by 0x4CB210A: my_copy_hashtable_ex (apc_compile.c:927)
==30284==    by 0x4CB435C: apc_copy_class_entry_for_execution 
(apc_compile.c:1737)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284== 
==30284== 20 bytes in 1 blocks are definitely lost in loss record 1,352 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB4D96: apc_register_serializer (apc_serializer.h:62)
==30284==    by 0x4CB6EFC: apc_module_init (apc_main.c:820)
==30284==    by 0x4CA88F0: zm_startup_apc (php_apc.c:347)
==30284==    by 0x838BDE2: zend_startup_module_ex (zend_API.c:1661)
==30284==    by 0x8395128: zend_hash_apply (zend_hash.c:716)
==30284==    by 0x838C226: zend_startup_modules (zend_API.c:1788)
==30284==    by 0x8308062: php_module_startup (main.c:2191)
==30284==    by 0x849F3E7: php_cgi_startup (cgi_main.c:933)
==30284==    by 0x84A1DEF: main (cgi_main.c:1907)
==30284== 
==30284== 21 bytes in 3 blocks are possibly lost in loss record 1,376 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CBB8D5: apc_pmemcpy (apc_pool.c:492)
==30284==    by 0x4CB09CD: apc_string_pmemcpy (apc_compile.c:291)
==30284==    by 0x4CB425F: apc_copy_class_entry_for_execution 
(apc_compile.c:1712)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284== 
==30284== 36 bytes in 1 blocks are possibly lost in loss record 3,056 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x8393DD2: _zend_hash_quick_add_or_update (zend_hash.c:324)
==30284==    by 0x8395823: zend_hash_merge_ex (zend_hash.c:893)
==30284==    by 0x8364EC0: zend_do_inheritance (zend_compile.c:3519)
==30284==    by 0x4CB52AB: install_class (apc_main.c:214)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284==    by 0x84A31D2: main (cgi_main.c:2447)
==30284== 
==30284== 72 bytes in 2 blocks are possibly lost in loss record 4,710 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CBB8D5: apc_pmemcpy (apc_pool.c:492)
==30284==    by 0x4CB1F64: my_copy_hashtable_ex (apc_compile.c:891)
==30284==    by 0x4CB435C: apc_copy_class_entry_for_execution 
(apc_compile.c:1737)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284== 
==30284== 96 bytes in 3 blocks are possibly lost in loss record 4,762 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CB1E33: my_copy_hashtable_ex (apc_compile.c:861)
==30284==    by 0x4CB435C: apc_copy_class_entry_for_execution 
(apc_compile.c:1737)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284== 
==30284== 96 bytes in 3 blocks are possibly lost in loss record 4,763 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CB1E33: my_copy_hashtable_ex (apc_compile.c:861)
==30284==    by 0x4CB43BB: apc_copy_class_entry_for_execution 
(apc_compile.c:1748)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284== 
==30284== 96 bytes in 3 blocks are possibly lost in loss record 4,764 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CB1E33: my_copy_hashtable_ex (apc_compile.c:861)
==30284==    by 0x4CB441A: apc_copy_class_entry_for_execution 
(apc_compile.c:1763)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284== 
==30284== 136 bytes in 1 blocks are possibly lost in loss record 4,904 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x8393EE5: _zend_hash_quick_add_or_update (zend_hash.c:339)
==30284==    by 0x8395823: zend_hash_merge_ex (zend_hash.c:893)
==30284==    by 0x8364EC0: zend_do_inheritance (zend_compile.c:3519)
==30284==    by 0x4CB52AB: install_class (apc_main.c:214)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284==    by 0x84A31D2: main (cgi_main.c:2447)
==30284== 
==30284== 272 bytes in 2 blocks are possibly lost in loss record 5,011 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB4057: apc_copy_function_for_execution (apc_compile.c:1672)
==30284==    by 0x4CB4134: apc_copy_function_for_execution_ex 
(apc_compile.c:1683)
==30284==    by 0x4CB210A: my_copy_hashtable_ex (apc_compile.c:927)
==30284==    by 0x4CB435C: apc_copy_class_entry_for_execution 
(apc_compile.c:1737)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284== 
==30284== 396 bytes in 99 blocks are definitely lost in loss record 5,186 of 
5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CBB8D5: apc_pmemcpy (apc_pool.c:492)
==30284==    by 0x4CB3FEB: apc_copy_op_array_for_execution (apc_compile.c:1657)
==30284==    by 0x4CB58AB: cached_compile (apc_main.c:373)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284==    by 0x84A31D2: main (cgi_main.c:2447)
==30284== 
==30284== 960 bytes in 3 blocks are possibly lost in loss record 5,307 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CBB2A3: apc_unpool_alloc (apc_pool.c:91)
==30284==    by 0x4CB4168: apc_copy_class_entry_for_execution 
(apc_compile.c:1693)
==30284==    by 0x4CB51E6: install_class (apc_main.c:174)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284==    by 0x84A31D2: main (cgi_main.c:2447)
==30284== 
==30284== 176,902 (1,188 direct, 175,714 indirect) bytes in 297 blocks are 
definitely lost in loss record 5,476 of 5,478
==30284==    at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-
linux.so)
==30284==    by 0x8357EC4: _emalloc (zend_alloc.c:2423)
==30284==    by 0x4CB9353: apc_php_malloc (apc_zend.c:38)
==30284==    by 0x4CB51C1: install_class (apc_main.c:168)
==30284==    by 0x4CB57D6: cached_compile (apc_main.c:357)
==30284==    by 0x4CB61DA: my_compile_file (apc_main.c:552)
==30284==    by 0x8193F53: phar_compile_file (phar.c:3391)
==30284==    by 0x8385F99: zend_execute_scripts (zend.c:1271)
==30284==    by 0x8308771: php_execute_script (main.c:2473)
==30284==    by 0x84A31D2: main (cgi_main.c:2447)
==30284== 
==30284== LEAK SUMMARY:
==30284==    definitely lost: 1,604 bytes in 397 blocks
==30284==    indirectly lost: 175,714 bytes in 2,254 blocks
==30284==      possibly lost: 1,793 bytes in 23 blocks
==30284==    still reachable: 6,325,095 bytes in 15,568 blocks
==30284==         suppressed: 0 bytes in 0 blocks
==30284== Reachable blocks (those to which a pointer was found) are not shown.
==30284== To see them, rerun with: --leak-check=full --show-reachable=yes
==30284== 
==30284== For counts of detected and suppressed errors, rerun with: -v
==30284== ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)
 [2012-07-18 17:16 UTC] ab@php.net
Automatic comment from SVN on behalf of ab
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=326691
Log: fixed valgrind complains about serializer not being freed as pointed in bug #61360
 [2013-05-12 13:02 UTC] ab@php.net
-Status: Assigned +Status: Closed
 [2013-05-12 13:02 UTC] ab@php.net
Most of these leaks was pushed away and caused crashes, so they had to come back. 
Many leaks in APC are intentional due to the nature of how Apache or another SAPI 
works. Leaks in CLI might be OK for Apache and there's really no consent. For this 
reason I don't see why to leave this ticket open.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 17:01:25 2024 UTC