Merge branch 'PHP-8.3'

* PHP-8.3:
  Prevent recording traces started from usupported VM instruction
This commit is contained in:
Dmitry Stogov 2024-02-19 13:23:14 +03:00
commit e3683ea479

View file

@ -638,6 +638,16 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
return ZEND_JIT_TRACE_STOP_EXCEPTION;
}
trace_flags = ZEND_OP_TRACE_INFO(opline, offset)->trace_flags;
if (trace_flags & ZEND_JIT_TRACE_UNSUPPORTED) {
TRACE_END(ZEND_JIT_TRACE_END, ZEND_JIT_TRACE_STOP_NOT_SUPPORTED, opline);
#ifdef HAVE_GCC_GLOBAL_REGS
execute_data = save_execute_data;
opline = save_opline;
#endif
return ZEND_JIT_TRACE_STOP_NOT_SUPPORTED;
}
if (prev_call) {
int ret = zend_jit_trace_record_fake_init_call(prev_call, trace_buffer, idx, is_megamorphic);
if (ret < 0) {