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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 28 03:01:23 2020 UTC