php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22900 Declaring the same namespace multiple times leaks memory
Submitted: 2003-03-26 08:05 UTC Modified: 2003-03-26 10:11 UTC
From: mfischer@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2003-03-26 (dev) OS: Linux
Private report: No CVE-ID: None
 [2003-03-26 08:05 UTC] mfischer@php.net
(using a debug build)

Declaring the same namespace multiple times leaks memory. The leak is repeated for every further occurence of the same namespace.

$ cat namesapce.php
<?php
        namespace whatever { }
?>

$ php namesapce.php
$

$ cat namesapce.php
<?php
        namespace whatever { }
        namespace whatever { }
?>
$ php namesapce.php
/home/mfischer/isrc/cvs/php5/Zend/zend_language_scanner.l(1114) :  Freeing 0x401B0B70 (9 bytes), script=namesapce.php

 cat namesapce.php
<?php
        namespace whatever { }
        namespace whatever { }
        namespace whatever { }
?>
$ php namesapce.php
/home/mfischer/isrc/cvs/php5/Zend/zend_language_scanner.l(1114) :  Freeing 0x401B0BF8 (9 bytes), script=namesapce.php
Last leak repeated 1 time

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-26 10:11 UTC] iliaa@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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 14:01:27 2024 UTC