Skip to content

Commit b33e3eb

Browse files
committed
Fix zend_may_throw() for FETCH_DIM_IS and ISSET_ISEMPTY_DIM_OBJ
Recentlty this insructions were updated to emit warning on inability to convert double index to long. This may lead to exception. This fixes memory leak on wordpress test suite (nightly workflow)
1 parent 2cde4b2 commit b33e3eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/Optimizer/zend_inference.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5127,9 +5127,9 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
51275127
case ZEND_FETCH_IS:
51285128
return (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT));
51295129
case ZEND_ISSET_ISEMPTY_DIM_OBJ:
5130-
return (t1 & MAY_BE_OBJECT) || (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT));
5130+
return (t1 & MAY_BE_OBJECT) || (t2 & (MAY_BE_DOUBLE|MAY_BE_ARRAY|MAY_BE_OBJECT));
51315131
case ZEND_FETCH_DIM_IS:
5132-
return (t1 & MAY_BE_OBJECT) || (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE));
5132+
return (t1 & MAY_BE_OBJECT) || (t2 & (MAY_BE_DOUBLE|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE));
51335133
case ZEND_CAST:
51345134
switch (opline->extended_value) {
51355135
case IS_LONG:

0 commit comments

Comments
 (0)