com php-src: Fixed incorrect instruction cleanup: ext/opcache/O ptimizer/pass1_5.c
| From: | Dmitry Stogov | Date: | Wed, 28 Oct 2015 20:10:33 +0000 |
| Subject: | com php-src: Fixed incorrect instruction cleanup: ext/opcache/O ptimizer/pass1_5.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89554@lists.php.net to get a copy of this message | ||
Commit: da8e6ec4a5063d9f60f83f43c55bc17d015cac8b
Author: Dmitry Stogov <dmitry@zend.com> Wed, 28 Oct 2015 23:10:33 +0300
Parents: 3b44e40277a9e623df3f4389d3ebd42e495735cb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da8e6ec4a5063d9f60f83f43c55bc17d015cac8b
Log:
Fixed incorrect instruction cleanup
Changed paths:
M ext/opcache/Optimizer/pass1_5.c
Diff:
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index 0e41360..2aba4db 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -341,12 +341,12 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
zval_copy_ctor(&t);
}
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- literal_dtor(&ZEND_OP1_LITERAL(opline));
- } else {
- MAKE_NOP((opline - 1));
- }
if (zend_optimizer_replace_by_const(op_array, opline, IS_TMP_VAR, tv, &t)) {
+ if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ literal_dtor(&ZEND_OP1_LITERAL(opline));
+ } else if (ZEND_OP1_TYPE(opline) == IS_VAR) {
+ MAKE_NOP((opline - 1));
+ }
literal_dtor(&ZEND_OP2_LITERAL(opline));
MAKE_NOP(opline);
}