|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46160 SPL - Memory leak when exception is thrown in offsetSet method
Submitted: 2008-09-23 11:40 UTC Modified: 2008-09-25 00:24 UTC
From: Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: 5.3CVS-2008-09-23 (CVS) OS:
Private report: No CVE-ID: None
 [2008-09-23 11:40 UTC]
A simple detail, see the patch:

Reproduce code:

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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-23 12:06 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-2019 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:25 2019 UTC