php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67368 Memory leak with immediately dereferenced array in class constant
Submitted: 2014-06-01 16:27 UTC Modified: 2014-06-01 16:27 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ajf at ajf dot me Assigned: bwoebi (profile)
Status: Closed Package: Arrays related
PHP Version: master-Git-2014-06-01 (Git) OS: Mac OS X 10.9 (Mavericks)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 - 4 = ?
Subscribe to this entry?

 
 [2014-06-01 16:27 UTC] ajf at ajf dot me
Description:
------------
Running the code produces a memory leak warning on the command line when PHP is compiled with --debug.

This issue doesn't exist for constants outside of classes.

Test script:
---------------
<?php
class FooBar {
	const bar = ["bar" => 3]["bar"];
}

Actual result:
--------------
[Sun Jun  1 17:23:06 2014]  Script:  '-'
/Users/ajf/Projects/2014/PHP/php-src/Zend/zend_compile.c(5450) :  Freeing 0x10D027DC8 (32 bytes), script=-
=== Total 1 memory leaks detected ===


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-01 16:27 UTC] ajf@php.net
-Assigned To: +Assigned To: bwoebi
 [2014-06-24 05:53 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d49492fd66cce4d62ad57aa29ef3b6ae076e1ef
Log: Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant)
 [2014-06-24 05:53 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2014-06-30 20:23 UTC] dmitry@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d49492fd66cce4d62ad57aa29ef3b6ae076e1ef
Log: Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant)
 [2014-07-02 01:41 UTC] tyrael@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d49492fd66cce4d62ad57aa29ef3b6ae076e1ef
Log: Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant)
 [2014-07-02 08:26 UTC] ab@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d49492fd66cce4d62ad57aa29ef3b6ae076e1ef
Log: Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant)
 [2014-07-02 08:33 UTC] ab@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d49492fd66cce4d62ad57aa29ef3b6ae076e1ef
Log: Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC