Skip to content

Commit b44169e

Browse files
committed
Fixed bug #79864 (JIT segfault in Symfony OptionsResolver)
1 parent 4cf8b6f commit b44169e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.0.0beta1
44

5+
- JIT:
6+
. Fixed bug #79864 (JIT segfault in Symfony OptionsResolver). (Dmitry)
57

68
23 Jul 2020, PHP 8.0.0alpha3
79

ext/opcache/jit/zend_jit.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,6 +3029,17 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
30293029
zend_may_throw(opline, ssa_op, op_array, ssa))) {
30303030
goto jit_failure;
30313031
}
3032+
if (i == end
3033+
&& (opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) {
3034+
/* smart branch split across basic blocks */
3035+
if (!zend_jit_cond_jmp(&dasm_state, opline + 2, ssa->cfg.blocks[b+1].successors[0])) {
3036+
goto jit_failure;
3037+
}
3038+
if (!zend_jit_jmp(&dasm_state, ssa->cfg.blocks[b+1].successors[1])) {
3039+
goto jit_failure;
3040+
}
3041+
is_terminated = 1;
3042+
}
30323043
}
30333044
done:
30343045
switch (opline->opcode) {

0 commit comments

Comments
 (0)