]> granicus.if.org Git - php/commitdiff
We should always serialize the op->handler
authorXinchen Hui <laruence@gmail.com>
Sat, 9 Apr 2016 08:43:28 +0000 (01:43 -0700)
committerXinchen Hui <laruence@gmail.com>
Sat, 9 Apr 2016 08:43:28 +0000 (01:43 -0700)
ext/opcache/zend_file_cache.c

index 2fe5b61384c7c963fd1523360737b499e82eeb5a..6ac4f0e35f6452c52e0c7a9b2960c8f3edf3fc56 100644 (file)
@@ -373,7 +373,6 @@ static void zend_file_cache_serialize_op_array(zend_op_array            *op_arra
        }
 
        if (!IS_SERIALIZED(op_array->opcodes)) {
-#if ZEND_USE_ABS_CONST_ADDR || ZEND_USE_ABS_JMP_ADDR
                zend_op *opline, *end;
 
                SERIALIZE_PTR(op_array->opcodes);
@@ -381,15 +380,15 @@ static void zend_file_cache_serialize_op_array(zend_op_array            *op_arra
                UNSERIALIZE_PTR(opline);
                end = opline + op_array->last;
                while (opline < end) {
-# if ZEND_USE_ABS_CONST_ADDR
+#if ZEND_USE_ABS_CONST_ADDR
                        if (opline->op1_type == IS_CONST) {
                                SERIALIZE_PTR(opline->op1.zv);
                        }
                        if (opline->op2_type == IS_CONST) {
                                SERIALIZE_PTR(opline->op2.zv);
                        }
-# endif
-# if ZEND_USE_ABS_JMP_ADDR
+#endif
+#if ZEND_USE_ABS_JMP_ADDR
                        switch (opline->opcode) {
                                case ZEND_JMP:
                                case ZEND_FAST_CALL:
@@ -416,13 +415,10 @@ static void zend_file_cache_serialize_op_array(zend_op_array            *op_arra
                                        /* relative extended_value don't have to be changed */
                                        break;
                        }
-# endif
+#endif
                        zend_serialize_opcode_handler(opline);
                        opline++;
                }
-#else
-               SERIALIZE_PTR(op_array->opcodes);
-#endif
 
                if (op_array->arg_info) {
                        zend_arg_info *p, *end;