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
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: 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 22 11:01:30 2024 UTC