|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38653 Memory leak
Submitted: 2006-08-30 10:26 UTC Modified: 2006-08-30 10:42 UTC
From: hannes dot magnusson at gmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2006-08-30 (CVS) OS: FreeBSD
Private report: No CVE-ID:
 [2006-08-30 10:26 UTC] hannes dot magnusson at gmail dot com
This little code snippet leaks..

Reproduce code:
class foo {
    const cons = 10;

class bar extends foo {

$foo = new ReflectionClass("foo");

Actual result:
==73146== 16 bytes in 1 blocks are definitely lost in loss 
record 1 of 2
==73146==    at 0x3C03C18B: malloc 
(in /usr/local/lib/valgrind/
==73146==    by 0x81A4EAF: _emalloc (zend_alloc.c:1628)
==73146==    by 0x81DBFF3: zend_do_fcall_common_helper_SPEC 
==73146==    by 0x81DCAD0: 
ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:322)
==73146==    by 0x81DBD01: execute (zend_vm_execute.h:92)
==73146==    by 0x81BE198: zend_execute_scripts 
==73146==    by 0x8178454: php_execute_script (main.c:1759)
==73146==    by 0x82236C0: main (php_cli.c:1102)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-30 10:42 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 05:01:41 2015 UTC