php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2109 Memory leak in each()
Submitted: 1999-08-19 19:24 UTC Modified: 1999-08-23 15:09 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (19/08/1999) OS: Linux 2.0.36/Debian slink
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: christophe dot massiot at mail dot dotcom dot fr
New email:
PHP Version: OS:

 

 [1999-08-19 19:24 UTC] christophe dot massiot at mail dot dotcom dot fr
The following script :

<?
class foo {
function affiche_dict() {
  $this->dict[date_message] = $toto;
  while (list($key, $val) = each($this->dict)) {}
}
}
  $bar = new foo;
  $err = $bar->affiche_dict();
?>

produces :

1:22 [webase3:p3] titi:~/html% php test.php
Content-Type: text/html

test.php:  Freeing 0x080F0308 (41 bytes), allocated in zend_hash.c on line 175<br>
test.php:  Freeing 0x080F02B8 (35 bytes), allocated in zend_hash.c on line 380<br>
test.php:  Freeing 0x080F5D48 (4 bytes), allocated in zend_hash.c on line 391<br>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-23 15:09 UTC] andi at cvs dot php dot net
Fixed in latest CVS. Thanks for the bug report.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Feb 28 03:01:27 2020 UTC