|
|
|
@ -359,6 +359,25 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra |
|
|
|
zend_file_cache_serialize_hash(ht, script, info, buf, zend_file_cache_serialize_zval); |
|
|
|
} |
|
|
|
|
|
|
|
if (op_array->scope && !IS_SERIALIZED(op_array->opcodes)) { |
|
|
|
if (UNEXPECTED(zend_shared_alloc_get_xlat_entry(op_array->opcodes))) { |
|
|
|
op_array->refcount = (uint32_t*)(intptr_t)-1; |
|
|
|
SERIALIZE_PTR(op_array->literals); |
|
|
|
SERIALIZE_PTR(op_array->opcodes); |
|
|
|
SERIALIZE_PTR(op_array->arg_info); |
|
|
|
SERIALIZE_PTR(op_array->vars); |
|
|
|
SERIALIZE_STR(op_array->function_name); |
|
|
|
SERIALIZE_STR(op_array->filename); |
|
|
|
SERIALIZE_PTR(op_array->brk_cont_array); |
|
|
|
SERIALIZE_PTR(op_array->scope); |
|
|
|
SERIALIZE_STR(op_array->doc_comment); |
|
|
|
SERIALIZE_PTR(op_array->try_catch_array); |
|
|
|
SERIALIZE_PTR(op_array->prototype); |
|
|
|
return; |
|
|
|
} |
|
|
|
zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes); |
|
|
|
} |
|
|
|
|
|
|
|
if (op_array->literals && !IS_SERIALIZED(op_array->literals)) { |
|
|
|
zval *p, *end; |
|
|
|
|
|
|
|
@ -919,6 +938,22 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr |
|
|
|
script, buf, zend_file_cache_unserialize_zval, ZVAL_PTR_DTOR); |
|
|
|
} |
|
|
|
|
|
|
|
if (op_array->refcount) { |
|
|
|
op_array->refcount = NULL; |
|
|
|
UNSERIALIZE_PTR(op_array->literals); |
|
|
|
UNSERIALIZE_PTR(op_array->opcodes); |
|
|
|
UNSERIALIZE_PTR(op_array->arg_info); |
|
|
|
UNSERIALIZE_PTR(op_array->vars); |
|
|
|
UNSERIALIZE_STR(op_array->function_name); |
|
|
|
UNSERIALIZE_STR(op_array->filename); |
|
|
|
UNSERIALIZE_PTR(op_array->brk_cont_array); |
|
|
|
UNSERIALIZE_PTR(op_array->scope); |
|
|
|
UNSERIALIZE_STR(op_array->doc_comment); |
|
|
|
UNSERIALIZE_PTR(op_array->try_catch_array); |
|
|
|
UNSERIALIZE_PTR(op_array->prototype); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (op_array->literals && !IS_UNSERIALIZED(op_array->literals)) { |
|
|
|
zval *p, *end; |
|
|
|
|
|
|
|
|