@@ -242,6 +242,15 @@ static void zend_file_cache_unserialize_zval(zval *zv,
242
242
zend_persistent_script * script ,
243
243
void * buf );
244
244
245
+ static void zend_file_cache_serialize_func (zval * zv ,
246
+ zend_persistent_script * script ,
247
+ zend_file_cache_metainfo * info ,
248
+ void * buf );
249
+
250
+ static void zend_file_cache_unserialize_func (zval * zv ,
251
+ zend_persistent_script * script ,
252
+ void * buf );
253
+
245
254
static void * zend_file_cache_serialize_interned (zend_string * str ,
246
255
zend_file_cache_metainfo * info )
247
256
{
@@ -364,8 +373,10 @@ static void zend_file_cache_serialize_ast(zend_ast *ast,
364
373
}
365
374
}
366
375
} else if (ast -> kind == ZEND_AST_OP_ARRAY ) {
367
- /* The op_array itself will be serialized as part of the dynamic_func_defs. */
368
- SERIALIZE_PTR (zend_ast_get_op_array (ast )-> op_array );
376
+ zval z ;
377
+ ZVAL_PTR (& z , zend_ast_get_op_array (ast )-> op_array );
378
+ zend_file_cache_serialize_func (& z , script , info , buf );
379
+ zend_ast_get_op_array (ast )-> op_array = Z_PTR (z );
369
380
} else if (ast -> kind == ZEND_AST_CALLABLE_CONVERT ) {
370
381
zend_ast_fcc * fcc = (zend_ast_fcc * )ast ;
371
382
ZEND_MAP_PTR_INIT (fcc -> fptr , NULL );
@@ -1252,8 +1263,10 @@ static void zend_file_cache_unserialize_ast(zend_ast *ast,
1252
1263
}
1253
1264
}
1254
1265
} else if (ast -> kind == ZEND_AST_OP_ARRAY ) {
1255
- /* The op_array itself will be unserialized as part of the dynamic_func_defs. */
1256
- UNSERIALIZE_PTR (zend_ast_get_op_array (ast )-> op_array );
1266
+ zval z ;
1267
+ ZVAL_PTR (& z , zend_ast_get_op_array (ast )-> op_array );
1268
+ zend_file_cache_unserialize_func (& z , script , buf );
1269
+ zend_ast_get_op_array (ast )-> op_array = Z_PTR (z );
1257
1270
} else if (ast -> kind == ZEND_AST_CALLABLE_CONVERT ) {
1258
1271
zend_ast_fcc * fcc = (zend_ast_fcc * )ast ;
1259
1272
ZEND_MAP_PTR_NEW (fcc -> fptr );
0 commit comments