php.net |  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: None
 [2006-08-30 10:26 UTC] hannes dot magnusson at gmail dot com
Description:
------------
This little code snippet leaks..

Reproduce code:
---------------
<?php
class foo {
    const cons = 10;
}

class bar extends foo {
}

$foo = new ReflectionClass("foo");
$foo->getConstant("cons");


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/vgpreload_memcheck.so)
==73146==    by 0x81A4EAF: _emalloc (zend_alloc.c:1628)
==73146==    by 0x81DBFF3: zend_do_fcall_common_helper_SPEC 
(zend_vm_execute.h:182)
==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 
(zend.c:1095)
==73146==    by 0x8178454: php_execute_script (main.c:1759)
==73146==    by 0x82236C0: main (php_cli.c:1102)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-30 10:42 UTC] tony2001@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC