File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -37,3 +37,7 @@ trait T2 {
37
37
class Y {
38
38
use T2 ;
39
39
}
40
+
41
+ class Z {
42
+ public $ foo ;
43
+ }
Original file line number Diff line number Diff line change @@ -874,9 +874,13 @@ static void zend_persist_class_entry(zval *zv)
874
874
int i ;
875
875
876
876
size_t size = sizeof (zend_property_info * ) * ce -> default_properties_count ;
877
- memcpy (ZCG (arena_mem ), ce -> properties_info_table , size );
878
- ce -> properties_info_table = ZCG (arena_mem );
879
- ZCG (arena_mem ) = (void * )((char * )ZCG (arena_mem ) + ZEND_ALIGNED_SIZE (size ));
877
+ if (ZCG (is_immutable_class )) {
878
+ ce -> properties_info_table = zend_shared_memdup_put (
879
+ ce -> properties_info_table , size );
880
+ } else {
881
+ ce -> properties_info_table = zend_shared_memdup_arena_put (
882
+ ce -> properties_info_table , size );
883
+ }
880
884
881
885
for (i = 0 ; i < ce -> default_properties_count ; i ++ ) {
882
886
ce -> properties_info_table [i ] = zend_shared_alloc_get_xlat_entry (ce -> properties_info_table [i ]);
Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ static void zend_persist_class_entry_calc(zval *zv)
388
388
zend_hash_persist_calc (& ce -> properties_info , zend_persist_property_info_calc );
389
389
390
390
if (ce -> properties_info_table ) {
391
- ADD_ARENA_SIZE (sizeof (zend_property_info * ) * ce -> default_properties_count );
391
+ ADD_SIZE_EX (sizeof (zend_property_info * ) * ce -> default_properties_count );
392
392
}
393
393
394
394
if (ce -> num_interfaces ) {
You can’t perform that action at this time.
0 commit comments