Bug #67368 [NEW]: Memory leak with immediately dereferenced array in class constant
| From: | ajf at ajf dot me | Date: | Sun, 01 Jun 2014 16:27:04 +0000 |
| Subject: | Bug #67368 [NEW]: Memory leak with immediately dereferenced array in class constant | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185997@lists.php.net to get a copy of this message | ||
From: ajf at ajf dot me
Operating system: Mac OS X 10.9 (Mavericks)
PHP version: master-Git-2014-06-01 (Git)
Package: Arrays related
Bug Type: Bug
Bug description:Memory leak with immediately dereferenced array in class constant
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 ===
--
Edit bug report at https://bugs.php.net/bug.php?id=67368&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67368&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67368&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67368&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67368&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67368&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67368&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67368&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67368&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67368&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67368&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67368&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67368&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67368&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67368&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67368&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67368&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67368&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67368&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67368&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67368&r=mysqlcfg