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 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:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 24 13:01:24 2021 UTC