Skip to content

Commit b7dd867

Browse files
committed
Fixed tracing JIT miss-compilation
1 parent 8d15a2b commit b7dd867

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5155,8 +5155,20 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o
51555155
case BP_JIT_IS:
51565156
| EXT_CALL zend_jit_fetch_dim_isset_helper, r0
51575157
| test r0, r0
5158-
| jne >8
5159-
| jmp >9
5158+
if (not_found_exit_addr) {
5159+
| je &not_found_exit_addr
5160+
if (op2_info & (MAY_BE_LONG|MAY_BE_STRING)) {
5161+
| jmp >8
5162+
}
5163+
} else if (found_exit_addr) {
5164+
| jne &found_exit_addr
5165+
if (op2_info & (MAY_BE_LONG|MAY_BE_STRING)) {
5166+
| jmp >9
5167+
}
5168+
} else {
5169+
| jne >8
5170+
| jmp >9
5171+
}
51605172
break;
51615173
case BP_VAR_IS:
51625174
case BP_VAR_UNSET:
@@ -10398,7 +10410,7 @@ static int zend_jit_isset_isempty_dim(dasm_State **Dst, const zend_op *opline, c
1039810410
&& !(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_ARRAY))
1039910411
&& !may_throw
1040010412
&& !(opline->op1_type & (IS_TMP_VAR|IS_VAR))
10401-
&& (!(opline->op2_type & (IS_TMP_VAR|IS_VAR)) || !(op2_info & MAY_BE_LONG))) {
10413+
&& (!(opline->op2_type & (IS_TMP_VAR|IS_VAR)) || !(op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_LONG)))) {
1040210414
if (smart_branch_opcode == ZEND_JMPNZ) {
1040310415
found_exit_addr = exit_addr;
1040410416
} else {

0 commit comments

Comments
 (0)