#46160 [NEW]: SPL - Memory leak when exception is throwed in offsetSet method
| From: | felipe@php.net | Date: | Tue, 23 Sep 2008 11:40:06 +0000 |
| Subject: | #46160 [NEW]: SPL - Memory leak when exception is throwed in offsetSet method | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-129205@lists.php.net to get a copy of this message | ||
From: felipe@php.net
Operating system:
PHP version: 5.3CVS-2008-09-23 (CVS)
PHP Bug Type: SPL related
Bug description: SPL - Memory leak when exception is throwed in offsetSet method
Description:
------------
A simple detail, see the patch:
http://felipe.ath.cx/diff/spl-offsetset.diff
Reproduce code:
---------------
<?php
try {
$x = new splqueue;
$x->offsetSet(0, 0);
} catch (Exception $e) { }
Actual result:
--------------
==25461== 20 bytes in 1 blocks are definitely lost in loss record 2 of 4
==25461== at 0x4021620: malloc (vg_replace_malloc.c:149)
==25461== by 0x83B9AD8: ZEND_SEND_VAL_SPEC_CONST_HANDLER
(zend_vm_execute.h:1691)
==25461== by 0x83B764B: execute (zend_vm_execute.h:104)
==25461== by 0x8397166: zend_execute_scripts (zend.c:1197)
==25461== by 0x8345947: php_execute_script (main.c:2080)
==25461== by 0x841F6A2: main (php_cli.c:1130)
--
Edit bug report at http://bugs.php.net/?id=46160&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46160&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46160&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46160&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46160&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=46160&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46160&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46160&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46160&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46160&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46160&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46160&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46160&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46160&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46160&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46160&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46160&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46160&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46160&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46160&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46160&r=mysqlcfg