Skip to content

Commit f91833d

Browse files
committed
Fix RC inference for DECLARE_LAMBDA_FUNCTION
It doesn't seem like the VM can return RCn. However, the JIT fails without it. I'll need to look into this more closely.
1 parent 79e8f20 commit f91833d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3967,7 +3967,7 @@ static zend_always_inline zend_result _zend_update_type_info(
39673967
UPDATE_SSA_TYPE(MAY_BE_BOOL, ssa_op->result_def);
39683968
break;
39693969
case ZEND_DECLARE_LAMBDA_FUNCTION:
3970-
UPDATE_SSA_TYPE(MAY_BE_OBJECT|MAY_BE_RC1, ssa_op->result_def);
3970+
UPDATE_SSA_TYPE(MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN, ssa_op->result_def);
39713971
UPDATE_SSA_OBJ_TYPE(zend_ce_closure, /* is_instanceof */ false, ssa_op->result_def);
39723972
break;
39733973
case ZEND_PRE_DEC_STATIC_PROP:

0 commit comments

Comments
 (0)