com php-src: We should always serialize the op->handler: ext/opcache/zend_file_cache.c
| From: | Xinchen Hui | Date: | Sat, 09 Apr 2016 08:43:28 +0000 |
| Subject: | com php-src: We should always serialize the op->handler: ext/opcache/zend_file_cache.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91672@lists.php.net to get a copy of this message | ||
Commit: 3e7b429663c31b98ac05959a0ab7990a3841c0b1
Author: Xinchen Hui <laruence@gmail.com> Sat, 9 Apr 2016 01:43:28 -0700
Parents: 2875ac9c00baec3a1e942a8de3a1a33facbd55a0
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3e7b429663c31b98ac05959a0ab7990a3841c0b1
Log:
We should always serialize the op->handler
Changed paths:
M ext/opcache/zend_file_cache.c
Diff:
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache..c
index 2fe5b61..6ac4f0e 100644
--- a/ext/opcache/zend_file_cache.c
+++ b/ext/opcache/zend_file_cache.c
@@ -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;