php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65997 Leak when using gc_collect_cycles with new GMP implementation
Submitted: 2013-10-29 18:44 UTC Modified: 2013-10-29 20:05 UTC
From: nikic@php.net Assigned: nikic (profile)
Status: Closed Package: GNU MP related
PHP Version: master-Git-2013-10-29 (Git) OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nikic@php.net
New email:
PHP Version: OS:

 

 [2013-10-29 18:44 UTC] nikic@php.net
Description:
------------
From http://www.reddit.com/r/PHP/comments/1hx7qz/what_is_going_on_here_how_do_i_fix_t

function calcExp ($gmpC) {
    //make sure gc is on
    gc_enable();

    for ($i=0; $i<2000000000; $i++) {
        $gmpTempC = $gmpC;
        gc_collect_cycles();
    }
    return false;
}

$num = gmp_init('1094189891312342345461854');
print "\n";
calcExp($num);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-29 20:05 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2013-11-04 09:00 UTC] ab@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4218e89f8df4ca3897e3aad595e0c2c9cf4c3aca
Log: Fix bug #65997 by switching to Serializable for GMP
 [2013-11-17 09:30 UTC] laruence@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4218e89f8df4ca3897e3aad595e0c2c9cf4c3aca
Log: Fix bug #65997 by switching to Serializable for GMP
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 29 23:01:28 2024 UTC