Bug #69549 [NEW]: Memory leak with opcache.optimization_level=0xFFFFFFFF
| From: | naoki-kawamukai at cybozu dot co dot jp | Date: | Thu, 30 Apr 2015 02:05:29 +0000 |
| Subject: | Bug #69549 [NEW]: Memory leak with opcache.optimization_level=0xFFFFFFFF | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-192417@lists.php.net to get a copy of this message | ||
From: naoki-kawamukai at cybozu dot co dot jp
Operating system: Debian 7.8
PHP version: 5.5Git-2015-04-30 (Git)
Package: opcache
Bug Type: Bug
Bug description:Memory leak with opcache.optimization_level=0xFFFFFFFF
Description:
------------
This leaks occurs on PHP 5.5(Git-2015-04-30), PHP 5.6(Git-2015-04-30).
But it does not occur on PHP 7.0(Git-2015-04-30)
My opcache configuration:
vagrant@php7dev:~$ php -i | grep opcache
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 1 => 1
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 8 => 8
opcache.load_comments => 1 => 1
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 256 => 256
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 2 => 2
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On
Test script:
---------------
<?php
$a = array(true);
if($a[0] && false) {
echo 'test';
}
?>
Expected result:
----------------
Nothing happen.
Actual result:
--------------
Memory leaks.
vagrant@php7dev:~$ php -d opcache.enable_cli=1 -d
opcache.optimization_level=0xFFFFFFFF leak.php
[Thu Apr 30 01:42:30 2015] Script: '/home/vagrant/leak.php'
/home/vagrant/php-src/Zend/zend_vm_execute.h(6257) : Freeing
0x7F6A57B167E0 (32 bytes), script=/home/vagrant/leak.php
=== Total 1 memory leaks detected ===
When disabling opcache optimization, memory does not leak.
vagrant@php7dev:~$ php -d opcache.enable_cli=1 -d
opcache.optimization_level=0 leak.php
--
Edit bug report at https://bugs.php.net/bug.php?id=69549&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69549&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69549&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69549&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69549&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69549&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69549&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69549&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69549&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69549&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69549&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69549&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69549&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69549&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69549&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69549&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69549&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69549&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69549&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69549&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69549&r=mysqlcfg