Skip to content

Commit 8e067ce

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

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
@@ -10102,6 +10102,22 @@ static int zend_jit_do_fcall(zend_jit_ctx *jit, const zend_op *opline, const zen
1010210102
ir_STORE(jit_EX(opline), jit_IP(jit));
1010310103
}
1010410104
jit_observer_fcall_begin(jit, rx, observer_handler);
10105+
10106+
if (trace) {
10107+
int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
10108+
10109+
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
10110+
if (!exit_addr) {
10111+
return 0;
10112+
}
10113+
} else {
10114+
exit_addr = NULL;
10115+
}
10116+
10117+
if (!zend_jit_check_timeout(jit, NULL /* we're inside the called function */, exit_addr)) {
10118+
return 0;
10119+
}
10120+
1010510121
jit_observer_fcall_is_unobserved_end(jit, &unobserved_data);
1010610122
}
1010710123

0 commit comments

Comments
 (0)