Bug #67368 [Asn->Csd]: Memory leak with immediately dereferenced array in class constant

From: Date: Tue, 24 Jun 2014 05:53:55 +0000
Subject: Bug #67368 [Asn->Csd]: Memory leak with immediately dereferenced array in class constant
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186318@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67368&edit=1 ID: 67368 Updated by: laruence@php.net Reported by: ajf at ajf dot me Summary: Memory leak with immediately dereferenced array in class constant -Status: Assigned +Status: Closed Type: Bug Package: Arrays related Operating System: Mac OS X 10.9 (Mavericks) PHP Version: master-Git-2014-06-01 (Git) Assigned To: bwoebi Block user comment: N Private report: N New Comment: 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) Previous Comments: ------------------------------------------------------------------------ [2014-06-01 16:27:03] 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 === ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67368&edit=1

« previous php.bugs (#186318) next »