php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35284 gmp_mod() has memory leak since very long time
Submitted: 2005-11-18 21:08 UTC Modified: 2005-11-18 21:29 UTC
From: hoarau76 at free dot fr Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 5.0.5 OS: freebsd 6 x86
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: hoarau76 at free dot fr
New email:
PHP Version: OS:

 

 [2005-11-18 21:08 UTC] hoarau76 at free dot fr
Description:
------------
there is a very long bug with gmp_mod(): memory leak problem
which was reported here in may 2004 here:
http://www.devpen.com/forums/index.php?showtopic=15
and it persists


Reproduce code:
---------------
for ($i=10000000;$i > 0;$i--) { $x = gmp_mod($i,"64");}

Expected result:
----------------
when you do a "top" you see the memory usage increasing very quickly

Actual result:
--------------
FATAL:  emalloc():  Unable to allocate 309 bytes


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-18 21:29 UTC] tony2001@php.net
"Reported"?
We have only one bug system where you can report a bug and it is bugs.php.net.

And yes, gmp_mod() (not the function itself, but the underlying gmp routines) use memory quite aggressively.
Report that to GMP authors.
Not PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 16:01:33 2024 UTC