com php-src: Fixed bug #66440 (Optimisation of conditional JMPs based on pre-evaluate constant function calls): ext/opcache/Optimizer/pa ss1_5.c
ext/opcache/tests/bug66440.phpt

From: Date: Mon, 13 Jan 2014 12:16:23 +0000
Subject: com php-src: Fixed bug #66440 (Optimisation of conditional JMPs based on pre-evaluate constant function calls): ext/opcache/Optimizer/pa ss1_5.c
ext/opcache/tests/bug66440.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75590@lists.php.net to get a copy of this message
Commit: 9b74dc4a07a2c5178cbedc41b0beedd979537ffa Author: Dmitry Stogov <dmitry@zend.com> Mon, 13 Jan 2014 16:16:23 +0400 Parents: ca550248f18c842c22f3db880b8ea66c553da343 Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9b74dc4a07a2c5178cbedc41b0beedd979537ffa Log: Fixed bug #66440 (Optimisation of conditional JMPs based on pre-evaluate constant function calls) Bugs: https://bugs.php.net/66440 Changed paths: M ext/opcache/Optimizer/pass1_5.c A ext/opcache/tests/bug66440.phpt Diff: diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c index 8f76c63..577d1b6 100644 --- a/ext/opcache/Optimizer/pass1_5.c +++ b/ext/opcache/Optimizer/pass1_5.c @@ -433,7 +433,7 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) { zval t; if (zend_get_persistent_constant(Z_STRVAL(ZEND_OP1_LITERAL(opline - 1)), - Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)), &t, 0 TSRMLS_CC)) { + Z_STRLEN(ZEND_OP1_LITERAL(opline - 1)), &t, 1 TSRMLS_CC)) { if (replace_var_by_const(op_array, opline + 1, ZEND_RESULT(opline).var, &t TSRMLS_CC)) { literal_dtor(&ZEND_OP1_LITERAL(opline - 1)); MAKE_NOP((opline - 1)); diff --git a/ext/opcache/tests/bug66440.phpt b/ext/opcache/tests/bug66440.phpt new file mode 100644 index 0000000..b546e32 --- /dev/null +++ b/ext/opcache/tests/bug66440.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #66440 (Optimisation of conditional JMPs based on pre-evaluate constant function calls) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +opcache.file_update_protection=0 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +if(constant('PHP_BINARY')) { + echo "OK\n"; +} +--EXPECT-- +OK

« previous php.cvs (#75590) next »