Skip to content

Commit 1f58365

Browse files
committed
Fix type inference
Fixes oss-fuzz #43367
1 parent 698ac23 commit 1f58365

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,9 +2636,6 @@ static zend_always_inline int _zend_update_type_info(
26362636
tmp |= MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING;
26372637
}
26382638
}
2639-
if (t1 & MAY_BE_OBJECT) {
2640-
tmp |= MAY_BE_REF;
2641-
}
26422639
tmp |= MAY_BE_RC1 | MAY_BE_RCN;
26432640
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
26442641
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
JIT ASSIGN_DIM: 008
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.file_update_protection=0
7+
opcache.jit_buffer_size=1M
8+
--FILE--
9+
<?php
10+
function(int $a) {
11+
$arr = $a[] = (y);
12+
$arr = y;
13+
$c = $y = $arr[] = y($c);
14+
}
15+
?>
16+
DONE
17+
--EXPECT--
18+
DONE

0 commit comments

Comments
 (0)