|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37596 sha1_file() eating memory like so much nami
Submitted: 2006-05-26 00:29 UTC Modified: 2006-06-03 01:00 UTC
From: jlevy at imerica dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.1.4 OS: Debian GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jlevy at imerica dot com
New email:
PHP Version: OS:


 [2006-05-26 00:29 UTC] jlevy at imerica dot com
sha1_file() not releasing memory.

After calling thousands of sha1_file() I noticed that memory resources are not being freed. Script evenually bombs due to lack of resources.

** Note ** I think md5_file() is doing the same thing.

Reproduce code:
function getFiles(&$rdi,$depth=0) {

   if (!is_object($rdi))
   for ($rdi->rewind();$rdi->valid();$rdi->next()) {
       if ($rdi->isDot())
       if ($rdi->isDir() || $rdi->isFile()) {
               echo sha1_file($rdi->current());
           if ($rdi->hasChildren())

//** I figured that calling clearstatcache() might help, but no, it didn't **//


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-26 19:01 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-06-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 11:01:34 2024 UTC