Skip to content

Commit

Permalink
Fixed bug #79864 (JIT segfault in Symfony OptionsResolver)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jul 21, 2020
1 parent 4cf8b6f commit b44169e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.0beta1

- JIT:
. Fixed bug #79864 (JIT segfault in Symfony OptionsResolver). (Dmitry)

23 Jul 2020, PHP 8.0.0alpha3

Expand Down
11 changes: 11 additions & 0 deletions ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3029,6 +3029,17 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
zend_may_throw(opline, ssa_op, op_array, ssa))) {
goto jit_failure;
}
if (i == end
&& (opline->result_type & (IS_SMART_BRANCH_JMPZ|IS_SMART_BRANCH_JMPNZ)) != 0) {
/* smart branch split across basic blocks */
if (!zend_jit_cond_jmp(&dasm_state, opline + 2, ssa->cfg.blocks[b+1].successors[0])) {
goto jit_failure;
}
if (!zend_jit_jmp(&dasm_state, ssa->cfg.blocks[b+1].successors[1])) {
goto jit_failure;
}
is_terminated = 1;
}
}
done:
switch (opline->opcode) {
Expand Down

0 comments on commit b44169e

Please sign in to comment.