php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78999 Cycle leak when using function result as temporary
Submitted: 2019-12-19 11:34 UTC Modified: 2019-12-19 11:41 UTC
From: nikic@php.net Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.4Git-2019-12-19 (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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nikic@php.net
New email:
PHP Version: OS:

 

 [2019-12-19 11:34 UTC] nikic@php.net
Description:
------------
We destroy temporaries using zval_ptr_dtor_nogc, so the root is not registered.

Test script:
---------------
<?php
function get() {
    $t = new stdClass;
    $t->prop = $t;
    return $t;
}
var_dump(get());



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-12-19 11:41 UTC] dmitry@php.net
-Assigned To: +Assigned To: dmitry
 [2019-12-19 20:19 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=eb846939b1ecc45fbc4898f4234fea128e8f9551
Log: Fixed bug #78999 (Cycle leak when using function result as temporary)
 [2019-12-19 20:19 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 13:01:30 2024 UTC