From: [EMAIL PROTECTED]
Operating system:
PHP version: 5.3CVS-2008-09-18 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description: Memory leak when calling a method using Reflection
Description:
------------
zend_execute_API.c:903 -> ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
zend_interfaces.c:51 -> fci.retval_ptr_ptr = retval_ptr_ptr ?
retval_ptr_ptr : &retval
zend_execute_API.c:699 -> *fci->retval_ptr_ptr = NULL;
Reproduce code:
---------------
<?php
$x = new reflectionmethod('RecursiveArrayIterator', 'asort');
$x->invoke(new RecursiveArrayIterator(array()));
Actual result:
--------------
==16579== 20 bytes in 1 blocks are definitely lost in loss record 2 of 4
==16579== at 0x4021620: malloc (vg_replace_malloc.c:149)
==16579== by 0x838C7DF: zend_call_function (zend_execute_API.c:903)
==16579== by 0x81B101F: zim_reflection_method_invoke
(php_reflection.c:2510)
==16579== by 0x83B8992: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==16579== by 0x83B74EB: execute (zend_vm_execute.h:104)
==16579== by 0x8397006: zend_execute_scripts (zend.c:1197)
==16579== by 0x83457F7: php_execute_script (main.c:2080)
==16579== by 0x841F542: main (php_cli.c:1130)
--
Edit bug report at http://bugs.php.net/?id=46115&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46115&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46115&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46115&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46115&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46115&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46115&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46115&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46115&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46115&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46115&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46115&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46115&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46115&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46115&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46115&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46115&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46115&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46115&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46115&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46115&r=mysqlcfg