Skip to content

Commit a60ac75

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

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
@@ -10064,6 +10064,22 @@ static int zend_jit_do_fcall(zend_jit_ctx *jit, const zend_op *opline, const zen
1006410064
ir_STORE(jit_EX(opline), jit_IP(jit));
1006510065
}
1006610066
jit_observer_fcall_begin(jit, rx, observer_handler);
10067+
10068+
if (trace) {
10069+
int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
10070+
10071+
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
10072+
if (!exit_addr) {
10073+
return 0;
10074+
}
10075+
} else {
10076+
exit_addr = NULL;
10077+
}
10078+
10079+
if (!zend_jit_check_timeout(jit, NULL /* we're inside the called function */, exit_addr)) {
10080+
return 0;
10081+
}
10082+
1006710083
jit_observer_fcall_is_unobserved_end(jit, &unobserved_data);
1006810084
}
1006910085

0 commit comments

Comments
 (0)