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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC