php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18108 memory leak in class encapsulated array with a constant as key
Submitted: 2002-07-02 09:07 UTC Modified: 2002-09-09 10:34 UTC
From: sander@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0CVS-2002-07-02 OS: Debian Linux
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: sander@php.net
New email:
PHP Version: OS:

 

 [2002-07-02 09:07 UTC] sander@php.net
The following code leaks sizeof("blaat") bytes of memory

/Zend/zend_language_scanner.l(1358) : Freeing 0x084B0E34 (6 bytes), script=...

<?php
define('foo', 1);
class bar {
	$baz = array(foo => "blaat");  /* var $baz ... has the same effect */
}
?>

This only happens when the array key is an constant, and the syntax is used inside a class.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-09 10:32 UTC] stas@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2002-09-09 10:34 UTC] kalowsky@php.net
Closed = fixed in CVS :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Feb 15 06:01:29 2025 UTC