Skip to content

Commit

Permalink
Transfer MAY_BE_INDIRECT for VERIFY_RETURN
Browse files Browse the repository at this point in the history
If the input is indirect, the output will be indirect too.
  • Loading branch information
nikic committed Jul 21, 2021
1 parent 848b545 commit e3d90fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Zend/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -3545,6 +3545,7 @@ static zend_always_inline int _zend_update_type_info(
} else {
zend_arg_info *ret_info = op_array->arg_info - 1;
tmp = zend_fetch_arg_info_type(script, ret_info, &ce);
tmp |= (t1 & MAY_BE_INDIRECT);

// TODO: We could model more precisely how illegal types are converted.
uint32_t extra_types = t1 & ~tmp;
Expand Down

0 comments on commit e3d90fa

Please sign in to comment.