Skip to content

Commit 63f529f

Browse files
committed
Allow EG(vm_interrupt) in observer start handler to leave JIT
Signed-off-by: Bob Weinand <[email protected]>
1 parent 04a5733 commit 63f529f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10101,6 +10101,22 @@ static int zend_jit_do_fcall(zend_jit_ctx *jit, const zend_op *opline, const zen
1010110101
ir_STORE(jit_EX(opline), jit_IP(jit));
1010210102
}
1010310103
jit_observer_fcall_begin(jit, rx, observer_handler);
10104+
10105+
if (trace) {
10106+
int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
10107+
10108+
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
10109+
if (!exit_addr) {
10110+
return 0;
10111+
}
10112+
} else {
10113+
exit_addr = NULL;
10114+
}
10115+
10116+
if (!zend_jit_check_timeout(jit, NULL /* we're inside the called function */, exit_addr)) {
10117+
return 0;
10118+
}
10119+
1010410120
jit_observer_fcall_is_unobserved_end(jit, &unobserved_data);
1010510121
}
1010610122

0 commit comments

Comments
 (0)