php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2012 Memory leak in some object instantiations with boolean class variables
Submitted: 1999-08-09 17:46 UTC Modified: 1999-08-17 18:31 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 2 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-09 17:46 UTC] christophe dot massiot at mail dot dotcom dot fr
The following script :

<?
class titi {
  var $foobar = TRUE;
}
class toto extends titi { }
$object = new titi;
?>

produces :

23:27 [webase3:p2] titi:~/html% php temp.phtml
Content-Type: text/html

temp.phtml:  Freeing 0x080F3E60 (4 bytes), allocated in zend_hash.c on line 185<br>
temp.phtml:  Freeing 0x080F4100 (42 bytes), allocated in zend_hash.c on line 175<br>

Note that the var $foobar = TRUE is important and can only be TRUE or FALSE (the problem doesn't show up with "" or array()).
Note also that the unused line class toto extends titi { } is necessary.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-17 18:31 UTC] zeev at cvs dot php dot net
Fixed - thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 01:01:30 2024 UTC