File tree 1 file changed +12
-0
lines changed 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ static int zend_file_cache_flock(int fd, int type)
186
186
} \
187
187
} while (0)
188
188
189
+ #define HOOKED_ITERATOR_PLACEHOLDER ((void*)1)
190
+
189
191
static const uint32_t uninitialized_bucket [- HT_MIN_MASK ] =
190
192
{HT_INVALID_IDX , HT_INVALID_IDX };
191
193
@@ -903,6 +905,11 @@ static void zend_file_cache_serialize_class(zval *zv,
903
905
ZEND_MAP_PTR_INIT (ce -> mutable_data , NULL );
904
906
905
907
ce -> inheritance_cache = NULL ;
908
+
909
+ if (ce -> get_iterator ) {
910
+ ZEND_ASSERT (ce -> get_iterator == zend_hooked_object_get_iterator );
911
+ ce -> get_iterator = HOOKED_ITERATOR_PLACEHOLDER ;
912
+ }
906
913
}
907
914
908
915
static void zend_file_cache_serialize_warnings (
@@ -1751,6 +1758,11 @@ static void zend_file_cache_unserialize_class(zval *zv,
1751
1758
ZEND_MAP_PTR_INIT (ce -> static_members_table , NULL );
1752
1759
}
1753
1760
1761
+ if (ce -> get_iterator ) {
1762
+ ZEND_ASSERT (ce -> get_iterator == HOOKED_ITERATOR_PLACEHOLDER );
1763
+ ce -> get_iterator = zend_hooked_object_get_iterator ;
1764
+ }
1765
+
1754
1766
// Memory addresses of object handlers are not stable. They can change due to ASLR or order of linking dynamic. To
1755
1767
// avoid pointing to invalid memory we relink default_object_handlers here.
1756
1768
ce -> default_object_handlers = ce -> ce_flags & ZEND_ACC_ENUM ? & zend_enum_object_handlers : & std_object_handlers ;
You can’t perform that action at this time.
0 commit comments