Skip to content

Commit da8b583

Browse files
committed
Always generate interrupt check in jit
Even if zend_interrupt_function is NULL, we still need to perform the interrupt check for timeouts (which do not use zend_interrupt_function).
1 parent 705f8ab commit da8b583

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,28 +2680,25 @@ static int zend_jit_set_valid_ip(dasm_State **Dst, const zend_op *opline)
26802680

26812681
static int zend_jit_check_timeout(dasm_State **Dst, const zend_op *opline)
26822682
{
2683-
if (zend_interrupt_function) {
26842683
#if 0
2685-
if (!zend_jit_set_valid_ip(Dst, opline)) {
2686-
return 0;
2687-
}
2688-
| MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0
2689-
| jne ->interrupt_handler
2684+
if (!zend_jit_set_valid_ip(Dst, opline)) {
2685+
return 0;
2686+
}
2687+
| MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0
2688+
| jne ->interrupt_handler
26902689
#else
2691-
| MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0
2692-
if (last_valid_opline == opline) {
2693-
| jne ->interrupt_handler
2694-
} else {
2695-
| jne >1
2696-
|.cold_code
2697-
|1:
2698-
| LOAD_IP_ADDR opline
2699-
| jmp ->interrupt_handler
2700-
|.code
2701-
}
2702-
return 1;
2703-
#endif
2690+
| MEM_OP2_1_ZTS cmp, byte, executor_globals, vm_interrupt, 0, r0
2691+
if (last_valid_opline == opline) {
2692+
| jne ->interrupt_handler
2693+
} else {
2694+
| jne >1
2695+
|.cold_code
2696+
|1:
2697+
| LOAD_IP_ADDR opline
2698+
| jmp ->interrupt_handler
2699+
|.code
27042700
}
2701+
#endif
27052702
return 1;
27062703
}
27072704

0 commit comments

Comments
 (0)