]> granicus.if.org Git - php/commitdiff
Fixed for PHP7
authorXinchen Hui <laruence@gmail.com>
Thu, 17 Mar 2016 12:20:01 +0000 (20:20 +0800)
committerXinchen Hui <laruence@gmail.com>
Thu, 17 Mar 2016 12:20:01 +0000 (20:20 +0800)
NEWS
ext/opcache/Optimizer/block_pass.c

diff --git a/NEWS b/NEWS
index 4833396a37ec32a9f6e9acb08fdf040422b4bf06..419fbc499a42596ef4ce52d19d3b0a1dbe2e206b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@ PHP                                                                        NEWS
 - Core: 
   . Fixed bug #71841 (EG(error_zval) is not handled well). (Laruence)
 
+- Opcache:
+  . Fixed bug #71843 (null ptr deref ZEND_RETURN_SPEC_CONST_HANDLER).
+    (Laruence)
+
 - Standard:
   . Fixed bug #71840 (Unserialize accepts wrongly data). (Ryat, Laruence)
 
index 1e85b0bdea1730e4766f151e2897a93846b3e443..830addc38acfc2488a847583ca37cdb5475f4e9e 100644 (file)
@@ -1894,8 +1894,11 @@ static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, zend_b
                                        case ZEND_BOOL_NOT:
                                                if (ZEND_OP1_TYPE(opline) == IS_CONST) {
                                                        literal_dtor(&ZEND_OP1_LITERAL(opline));
+                                               } else if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
+                                                       opline->opcode = ZEND_FREE;
+                                               } else {
+                                                       MAKE_NOP(opline);
                                                }
-                                               MAKE_NOP(opline);
                                                break;
                                        case ZEND_JMPZ_EX:
                                        case ZEND_JMPNZ_EX: