@@ -1877,7 +1877,8 @@ static uint32_t get_ssa_alias_types(zend_ssa_alias_kind alias) {
1877
1877
} \
1878
1878
} \
1879
1879
if (ssa_var_info [__var ].type != __type ) { \
1880
- ZEND_ASSERT (__ssa_var -> var >= op_array -> last_var || \
1880
+ ZEND_ASSERT (ssa_opcodes != NULL || \
1881
+ __ssa_var -> var >= op_array -> last_var || \
1881
1882
(ssa_var_info [__var ].type & MAY_BE_REF ) \
1882
1883
== (__type & MAY_BE_REF )); \
1883
1884
if (ssa_var_info [__var ].type & ~__type ) { \
@@ -3445,7 +3446,7 @@ static zend_always_inline int _zend_update_type_info(
3445
3446
zend_property_info * prop_info = zend_fetch_prop_info (op_array , ssa , opline , ssa_op );
3446
3447
3447
3448
tmp = zend_fetch_prop_type (script , prop_info , & ce );
3448
- if (opline -> result_type != IS_TMP_VAR ) {
3449
+ if (opline -> result_type == IS_VAR ) {
3449
3450
tmp |= MAY_BE_REF | MAY_BE_INDIRECT ;
3450
3451
} else if (!(opline -> op1_type & (IS_VAR |IS_TMP_VAR )) || !(t1 & MAY_BE_RC1 )) {
3451
3452
zend_class_entry * ce = NULL ;
@@ -3481,7 +3482,7 @@ static zend_always_inline int _zend_update_type_info(
3481
3482
case ZEND_FETCH_STATIC_PROP_FUNC_ARG :
3482
3483
tmp = zend_fetch_prop_type (script ,
3483
3484
zend_fetch_static_prop_info (script , op_array , ssa , opline ), & ce );
3484
- if (opline -> result_type != IS_TMP_VAR ) {
3485
+ if (opline -> result_type == IS_VAR ) {
3485
3486
tmp |= MAY_BE_REF | MAY_BE_INDIRECT ;
3486
3487
} else {
3487
3488
tmp &= ~MAY_BE_RC1 ;
@@ -3600,6 +3601,8 @@ static zend_always_inline int _zend_update_type_info(
3600
3601
} else {
3601
3602
tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
3602
3603
}
3604
+ } else if (opline -> result_type == IS_CV ) {
3605
+ tmp |= MAY_BE_RC1 | MAY_BE_RCN ;
3603
3606
} else {
3604
3607
tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN ;
3605
3608
switch (opline -> opcode ) {
@@ -3698,6 +3701,7 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script
3698
3701
int i , j ;
3699
3702
uint32_t tmp , worklist_len = zend_bitset_len (ssa_vars_count );
3700
3703
bool update_worklist = 1 ;
3704
+ const zend_op * * ssa_opcodes = NULL ;
3701
3705
3702
3706
while (!zend_bitset_empty (worklist , worklist_len )) {
3703
3707
j = zend_bitset_first (worklist , worklist_len );
0 commit comments