@@ -105,6 +105,10 @@ static void zend_persist_zval_calc(zval *z)
105105 }
106106 break ;
107107 case IS_ARRAY :
108+ if (!ZCG (current_persistent_script )-> corrupted
109+ && zend_accel_in_shm (Z_ARR_P (z ))) {
110+ return ;
111+ }
108112 size = zend_shared_memdup_size (Z_ARR_P (z ), sizeof (zend_array ));
109113 if (size ) {
110114 Bucket * p ;
@@ -120,7 +124,8 @@ static void zend_persist_zval_calc(zval *z)
120124 }
121125 break ;
122126 case IS_CONSTANT_AST :
123- if (!zend_accel_in_shm (Z_AST_P (z ))) {
127+ if (ZCG (current_persistent_script )-> corrupted
128+ || !zend_accel_in_shm (Z_AST_P (z ))) {
124129 size = zend_shared_memdup_size (Z_AST_P (z ), sizeof (zend_ast_ref ));
125130 if (size ) {
126131 ADD_SIZE (size );
@@ -137,7 +142,8 @@ static void zend_persist_zval_calc(zval *z)
137142static void zend_persist_attributes_calc (HashTable * attributes )
138143{
139144 if (!zend_shared_alloc_get_xlat_entry (attributes )
140- && !zend_accel_in_shm (attributes )) {
145+ && (ZCG (current_persistent_script )-> corrupted
146+ || !zend_accel_in_shm (attributes ))) {
141147 zend_attribute * attr ;
142148 uint32_t i ;
143149
@@ -352,6 +358,10 @@ static void zend_persist_class_constant_calc(zval *zv)
352358 zend_class_constant * c = Z_PTR_P (zv );
353359
354360 if (!zend_shared_alloc_get_xlat_entry (c )) {
361+ if (!ZCG (current_persistent_script )-> corrupted
362+ && zend_accel_in_shm (Z_PTR_P (zv ))) {
363+ return ;
364+ }
355365 zend_shared_alloc_register_xlat_entry (c , c );
356366 ADD_SIZE (sizeof (zend_class_constant ));
357367 zend_persist_zval_calc (& c -> value );
0 commit comments