@@ -242,6 +242,15 @@ static void zend_file_cache_unserialize_zval(zval *zv,
242242 zend_persistent_script * script ,
243243 void * buf );
244244
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+
245254static void * zend_file_cache_serialize_interned (zend_string * str ,
246255 zend_file_cache_metainfo * info )
247256{
@@ -364,8 +373,10 @@ static void zend_file_cache_serialize_ast(zend_ast *ast,
364373 }
365374 }
366375 } 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 );
369380 } else if (ast -> kind == ZEND_AST_CALLABLE_CONVERT ) {
370381 zend_ast_fcc * fcc = (zend_ast_fcc * )ast ;
371382 ZEND_MAP_PTR_INIT (fcc -> fptr , NULL );
@@ -1252,8 +1263,10 @@ static void zend_file_cache_unserialize_ast(zend_ast *ast,
12521263 }
12531264 }
12541265 } 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 );
12571270 } else if (ast -> kind == ZEND_AST_CALLABLE_CONVERT ) {
12581271 zend_ast_fcc * fcc = (zend_ast_fcc * )ast ;
12591272 ZEND_MAP_PTR_NEW (fcc -> fptr );
0 commit comments