Commit d083168cef0 for php
commit d083168cef0e4cc28dca1fde50678abb59cc2e1e
Merge: f47c19c4fb0 36037a10eca
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date: Tue Oct 6 22:16:16 2026 +0200
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
Fix GH-20890: Segfault in zval_undefined_cv with non-simple property hook with minimal tracing JIT
diff --cc NEWS
index 0f6bb34b368,34db44b5c89..64235392b1b
--- a/NEWS
+++ b/NEWS
@@@ -140,6 -136,6 +140,8 @@@ PH
(ndossche)
. Fix SCCP evaluation of isset()/empty() on dimension of non-escaping object.
(ndossche)
++ . Fixed bug GH-20890 (Segfault in zval_undefined_cv with non-simple property
++ hook with minimal tracing JIT). (ndossche)
- OpenSSL:
. Fixed stream_socket_enable_crypto() leaving the socket non-blocking
diff --cc ext/opcache/jit/zend_jit_ir.c
index c91ad89da24,50851d75abb..c10c904a5a6
--- a/ext/opcache/jit/zend_jit_ir.c
+++ b/ext/opcache/jit/zend_jit_ir.c
@@@ -17142,19 -16892,8 +17142,21 @@@ static int zend_jit_trace_handler(zend_
if (GCC_GLOBAL_REGS) {
ir_CALL(IR_VOID, ir_CONST_FUNC(handler));
} else {
- ref = jit_FP(jit);
- ref = ir_CALL_1(IR_I32, ir_CONST_FC_FUNC(handler), ref);
+ ref = ir_CALL_2(IR_ADDR, ir_CONST_FC_FUNC(handler), jit_FP(jit), jit_IP(jit));
+ if (opline->opcode == ZEND_RETURN ||
+ opline->opcode == ZEND_RETURN_BY_REF ||
+ opline->opcode == ZEND_DO_UCALL ||
+ opline->opcode == ZEND_DO_FCALL_BY_NAME ||
+ opline->opcode == ZEND_DO_FCALL ||
+ opline->opcode == ZEND_GENERATOR_CREATE ||
- opline->opcode == ZEND_INCLUDE_OR_EVAL) {
++ opline->opcode == ZEND_INCLUDE_OR_EVAL ||
++ /* May enter a simple get hook. */
++ opline->opcode == ZEND_FETCH_OBJ_R) {
+
+ jit_STORE_IP(jit, ir_AND_A(ref, ir_CONST_ADDR(~ZEND_VM_ENTER_BIT)));
+ } else {
+ jit_STORE_IP(jit, ref);
+ }
}
if (may_throw
&& opline->opcode != ZEND_RETURN