php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2164 Memory leak with current/next
Submitted: 1999-08-26 07:41 UTC Modified: 1999-09-27 10:41 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (26/08/1999) OS: LinuxPPC R5/Linux 2.2.10
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 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-26 07:41 UTC] christophe dot massiot at mail dot dotcom dot fr
The following script :
<?
class message {
  var $KEYS = array("meuh");

function make_dict() {
  $this->titi = "";   
  for( ; $key = current($this->KEYS); next($this->KEYS))
    $this->titi[$key] = $toto;
  reset($this->KEYS);
}
}

$m = new message;
$m->make_dict(); 
$err = $m->make_dict();
?>

produces :

Content-Type: text/html

resultat_modif.phtml:  Freeing 0x018FE6A0 (40 bytes), allocated in zend_hash.c on line 175<br>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-27 10:41 UTC] andrey at cvs dot php dot net
This is working in the current CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 16:01:36 2025 UTC