Commit c325e9b317a for php.net
commit c325e9b317ad63cd46cf3a8fb966c7663ce9e960
Merge: ca08e0ff722 1f50b63369a
Author: Levi Morrison <levi.morrison@datadoghq.com>
Date: Thu Apr 30 14:05:07 2026 -0600
Merge branch 'PHP-8.4' into PHP-8.5
# Via GitHub
* PHP-8.4:
Fix JIT vm_interrupt (#21910)
# Conflicts:
# ext/opcache/jit/zend_jit_ir.c
diff --cc NEWS
index ae2ffb2499c,a6fe8e2136a..3553ae75517
--- a/NEWS
+++ b/NEWS
@@@ -1,7 -1,11 +1,11 @@@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? ????, PHP 8.4.22
+?? ??? ????, PHP 8.5.7
+ - Opcache:
+ . Fixed tracing JIT crash when a VM interrupt is handled during an observed
+ user function call. (Levi Morrison)
+
- Standard:
. Fixed bug GH-21689 (version_compare() incorrectly handles versions ending
with a dot). (timwolla)
diff --cc ext/opcache/jit/zend_jit_ir.c
index 826e48f555c,1346d141754..fc62d883bd3
--- a/ext/opcache/jit/zend_jit_ir.c
+++ b/ext/opcache/jit/zend_jit_ir.c
@@@ -10423,11 -10337,13 +10423,13 @@@ static int zend_jit_do_fcall(zend_jit_c
if (ZEND_OBSERVER_ENABLED && (!func || (func->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE | ZEND_ACC_GENERATOR)) == 0)) {
ir_ref observer_handler;
ir_ref rx = jit_FP(jit);
+ const zend_op *observer_opline = NULL;
struct jit_observer_fcall_is_unobserved_data unobserved_data = jit_observer_fcall_is_unobserved_start(jit, func, &observer_handler, rx, func_ref);
- if (trace && (trace->op != ZEND_JIT_TRACE_END || trace->stop != ZEND_JIT_TRACE_STOP_INTERPRETER)) {
+ if (trace && (trace->op != ZEND_JIT_TRACE_END || trace->stop < ZEND_JIT_TRACE_STOP_INTERPRETER)) {
ZEND_ASSERT(trace[1].op == ZEND_JIT_TRACE_VM || trace[1].op == ZEND_JIT_TRACE_END);
- jit_SET_EX_OPLINE(jit, trace[1].opline);
+ observer_opline = trace[1].opline;
+ jit_SET_EX_OPLINE(jit, observer_opline);
- } else if (GCC_GLOBAL_REGS) {
+ } else {
// EX(opline) = opline
ir_STORE(jit_EX(opline), jit_IP(jit));
}