php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70573 Cloning SplPriorityQueue leads to memory leaks
Submitted: 2015-09-24 13:40 UTC Modified: 2015-09-24 13:40 UTC
From: dmitry at zend dot com Assigned: dmitry (profile)
Status: Closed Package: SPL related
PHP Version: 7.0Git-2015-09-24 (Git) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dmitry at zend dot com
New email:
PHP Version: OS:

 

 [2015-09-24 13:40 UTC] dmitry at zend dot com
Description:
------------
Wrong code in spl_heap_object_new_ex() increments reference counters of elements twice.

Test script:
---------------
<?php
$q1 = new SplPriorityQueue();
$a = 1;
$q1->insert([$a], 1);
$q1->insert([$a], 2);
$q2 = clone $q1;
echo "ok\n";
?>


Expected result:
----------------
ok
[without memory leaks]

Actual result:
--------------
ok
[memory leaks]

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-24 13:40 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2015-09-24 13:43 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=415000ed93c6811cbceae3344d76ec63dbd7fff3
Log: Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks)
 [2015-09-24 13:43 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2015-09-29 13:10 UTC] ab@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=415000ed93c6811cbceae3344d76ec63dbd7fff3
Log: Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=415000ed93c6811cbceae3344d76ec63dbd7fff3
Log: Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC