@@ -2978,9 +2978,9 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
29782978 zend_function * * hooks = new_prop -> hooks =
29792979 zend_arena_alloc (& CG (arena ), ZEND_PROPERTY_HOOK_STRUCT_SIZE );
29802980 memcpy (hooks , property_info -> hooks , ZEND_PROPERTY_HOOK_STRUCT_SIZE );
2981- for (uint32_t i = 0 ; i < ZEND_PROPERTY_HOOK_COUNT ; i ++ ) {
2982- if (hooks [i ]) {
2983- zend_function * old_fn = hooks [i ];
2981+ for (uint32_t j = 0 ; j < ZEND_PROPERTY_HOOK_COUNT ; j ++ ) {
2982+ if (hooks [j ]) {
2983+ zend_function * old_fn = hooks [j ];
29842984
29852985 /* Hooks are not yet supported for internal properties. */
29862986 ZEND_ASSERT (ZEND_USER_CODE (old_fn -> type ));
@@ -2995,7 +2995,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
29952995
29962996 zend_fixup_trait_method (new_fn , ce );
29972997
2998- hooks [i ] = new_fn ;
2998+ hooks [j ] = new_fn ;
29992999 }
30003000 }
30013001 ce -> ce_flags |= ZEND_ACC_USE_GUARDS ;
@@ -3343,10 +3343,8 @@ static zend_op_array *zend_lazy_method_load(
33433343
33443344static zend_class_entry * zend_lazy_class_load (zend_class_entry * pce )
33453345{
3346- zend_class_entry * ce ;
3347- Bucket * p , * end ;
3346+ zend_class_entry * ce = zend_arena_alloc (& CG (arena ), sizeof (zend_class_entry ));
33483347
3349- ce = zend_arena_alloc (& CG (arena ), sizeof (zend_class_entry ));
33503348 memcpy (ce , pce , sizeof (zend_class_entry ));
33513349 ce -> ce_flags &= ~ZEND_ACC_IMMUTABLE ;
33523350 ce -> refcount = 1 ;
@@ -3372,11 +3370,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
33723370 /* methods */
33733371 ce -> function_table .pDestructor = ZEND_FUNCTION_DTOR ;
33743372 if (!(HT_FLAGS (& ce -> function_table ) & HASH_FLAG_UNINITIALIZED )) {
3375- p = emalloc (HT_SIZE (& ce -> function_table ));
3373+ Bucket * p = emalloc (HT_SIZE (& ce -> function_table ));
33763374 memcpy (p , HT_GET_DATA_ADDR (& ce -> function_table ), HT_USED_SIZE (& ce -> function_table ));
33773375 HT_SET_DATA_ADDR (& ce -> function_table , p );
33783376 p = ce -> function_table .arData ;
3379- end = p + ce -> function_table .nNumUsed ;
3377+ const Bucket * end = p + ce -> function_table .nNumUsed ;
33803378 for (; p != end ; p ++ ) {
33813379 zend_op_array * op_array = Z_PTR (p -> val );
33823380 zend_op_array * new_op_array = Z_PTR (p -> val ) = zend_lazy_method_load (op_array , ce , pce );
@@ -3412,11 +3410,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
34123410
34133411 /* properties_info */
34143412 if (!(HT_FLAGS (& ce -> properties_info ) & HASH_FLAG_UNINITIALIZED )) {
3415- p = emalloc (HT_SIZE (& ce -> properties_info ));
3413+ Bucket * p = emalloc (HT_SIZE (& ce -> properties_info ));
34163414 memcpy (p , HT_GET_DATA_ADDR (& ce -> properties_info ), HT_USED_SIZE (& ce -> properties_info ));
34173415 HT_SET_DATA_ADDR (& ce -> properties_info , p );
34183416 p = ce -> properties_info .arData ;
3419- end = p + ce -> properties_info .nNumUsed ;
3417+ const Bucket * end = p + ce -> properties_info .nNumUsed ;
34203418 for (; p != end ; p ++ ) {
34213419 zend_property_info * prop_info , * new_prop_info ;
34223420
@@ -3448,11 +3446,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
34483446
34493447 /* constants table */
34503448 if (!(HT_FLAGS (& ce -> constants_table ) & HASH_FLAG_UNINITIALIZED )) {
3451- p = emalloc (HT_SIZE (& ce -> constants_table ));
3449+ Bucket * p = emalloc (HT_SIZE (& ce -> constants_table ));
34523450 memcpy (p , HT_GET_DATA_ADDR (& ce -> constants_table ), HT_USED_SIZE (& ce -> constants_table ));
34533451 HT_SET_DATA_ADDR (& ce -> constants_table , p );
34543452 p = ce -> constants_table .arData ;
3455- end = p + ce -> constants_table .nNumUsed ;
3453+ const Bucket * end = p + ce -> constants_table .nNumUsed ;
34563454 for (; p != end ; p ++ ) {
34573455 zend_class_constant * c , * new_c ;
34583456
0 commit comments