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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 16 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC