Commit bbf8c393d74 for php.net

commit bbf8c393d747a2d6034155ded98be94a19ede574
Merge: 94918465230 905afb53654
Author: Arnaud Le Blanc <arnaud.lb@gmail.com>
Date:   Fri Aug 7 16:16:21 2026 +0200

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      JIT: Preserve parent regs in zend_jit_deoptimizer_start() (#22916)

diff --cc NEWS
index 25a706a9cb5,ba832ef0588..01849a378ff
--- a/NEWS
+++ b/NEWS
@@@ -11,18 -8,19 +11,20 @@@ PH
  - DOM:
    . Fixed bug GH-22825 (DOMElement::setAttribute() fails silently when the DTD
      declares a default value for the attribute). (iliaal)
 -  . Fixed bug GH-22447 (UAF at dom_objects_free_storage when setting an
 -    attribute node that collides by local name with a namespaced
 -    attribute). (David Carlier)

 -- MBString:
 -  . Fixed bug GH-22779 (mb_strrpos() returns the wrong position for a negative
 -    offset in a non-UTF-8 encoding). (Eyüp Can Akman)
 -  . Fixed bug GH-21036 (mb_ereg_search_getregs() crashes after mb_eregi()
 -    invalidates the regex cache). (Matthias Goergens)
 +- Intl:
 +  . Fixed IntlListFormatter::__construct() leaving stale global error state
 +    after successful calls. (Weilin Du)

  - Opcache:
 -  . Fixed bug GH-22857 (Function JIT emits wrong code for FETCH_OBJ_FUNC_ARG on a
 -    property hook getter, losing register-held variables). (Zhao Hao)
 +  . Fixed GH-22693 (DT_TEXTREL in JIT-generated TLS access on x86_64).
 +    (David Carlier)
 +  . Fixed bug GH-22763 (JIT fails to clear ZREG_TYPE_ONLY after setting reg).
 +    (Arnaud)
 +  . Fixed bug GH-22857 (Function JIT emits wrong code for FETCH_OBJ_FUNC_ARG on
 +    a property hook getter, losing register-held variables). (Zhao Hao)
++  . Fixed bug GH-22916 (Preserve parent regs in zend_jit_deoptimizer_start()).
++    (Arnaud)

  - OpenSSL:
    . Fix missing error check on invalid alpn protocols. (ndossche)
diff --cc ext/opcache/jit/zend_jit_ir.c
index 0cf52fb3849,4c20c115b84..5e4af150861
--- a/ext/opcache/jit/zend_jit_ir.c
+++ b/ext/opcache/jit/zend_jit_ir.c
@@@ -359,8 -338,11 +359,13 @@@ static int zend_jit_assign_to_variable(
                                         zend_jit_addr   ref_addr,
                                         bool       check_exception);

 +static ir_ref jit_CONST_FUNC(zend_jit_ctx *jit, uintptr_t addr, uint16_t flags);
 +
+ static void zend_jit_preserve_parent_regs(zend_jit_ctx *jit,
+                                           zend_ssa *ssa,
+                                           zend_jit_trace_info *parent,
+                                           uint32_t exit_num);
+
  typedef struct _zend_jit_stub {
  	const char *name;
  	int (*stub)(zend_jit_ctx *jit);
@@@ -17300,9 -17048,10 +17305,10 @@@ static int zend_jit_trace_handler(zend_
  static int zend_jit_deoptimizer_start(zend_jit_ctx        *jit,
                                        zend_string         *name,
                                        uint32_t             trace_num,
+                                       zend_jit_trace_info *parent,
                                        uint32_t             exit_num)
  {
 -	zend_jit_init_ctx(jit, (zend_jit_vm_kind == ZEND_VM_KIND_CALL) ? 0 : IR_START_BR_TARGET);
 +	zend_jit_init_ctx(jit, (ZEND_VM_KIND == ZEND_VM_KIND_CALL || ZEND_VM_KIND == ZEND_VM_KIND_TAILCALL) ? 0 : IR_START_BR_TARGET);

  	jit->ctx.spill_base = ZREG_FP;