Skip to content

Commit 8d15a2b

Browse files
committed
Restore registers
1 parent ef1de5e commit 8d15a2b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
590590

591591
if (UNEXPECTED(opline->opcode == ZEND_HANDLE_EXCEPTION)) {
592592
/* Abort trace because of exception */
593+
#ifdef HAVE_GCC_GLOBAL_REGS
594+
execute_data = save_execute_data;
595+
opline = save_opline;
596+
#endif
593597
return ZEND_JIT_TRACE_STOP_EXCEPTION;
594598
}
595599

@@ -609,6 +613,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
609613
if (prev_call) {
610614
int ret = zend_jit_trace_record_fake_init_call(prev_call, trace_buffer, idx, is_megamorphic, &megamorphic, ret_level + level);
611615
if (ret < 0) {
616+
#ifdef HAVE_GCC_GLOBAL_REGS
617+
execute_data = save_execute_data;
618+
opline = save_opline;
619+
#endif
612620
return ZEND_JIT_TRACE_STOP_BAD_FUNC;
613621
}
614622
idx = ret;

0 commit comments

Comments
 (0)