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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC