Commit 4fc0c741029 for php
commit 4fc0c7410292f58ef4c85a885308545a09d5e9ba
Merge: 3417bba8734 d8e69ef4aba
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date: Tue Nov 24 19:56:44 2026 +0100
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
ext/opcache: Fix JIT register allocation for ASSIGN to traced reference
diff --cc NEWS
index 9ff52d626ae,f063a91a30a..3923ea17479
--- a/NEWS
+++ b/NEWS
@@@ -130,21 -116,13 +130,22 @@@ PH
(pavimus)
. Fixed incorrect constant propagation when unpacking into partially known
arrays. (Weilin Du)
- . Fixed tracing JIT taking the wrong branch after a VM interrupt.
- (Brian Marks)
. Fixed function JIT ASSIGN_DIM reporting an undefined value or key out of
order, or when the VM does not, on non-array containers. (Jorg Sowa)
+ . Fixed bug GH-25449 (Element of a by-reference function result passed as
+ an argument arrives as null). (Ilia Alshanetsky)
+ . Fixed tracing JIT taking the wrong branch after a VM interrupt.
+ (Brian Marks)
+ . Fix JIT register allocation for ASSIGN to traced reference. (ndossche)
- OpenSSL:
+ . Fixed bug GH-25172 (TLS session reuse shares request-lifetime callback
+ structures with persistent streams). (cxxz16, David Carlier)
+ . Fixed an exception thrown by the session_get_cb stream context callback
+ being replaced with a TypeError. (Ilia Alshanetsky)
+ . Fixed use-after-free when a stream is closed by the callback for
+ `early_data_cb`, `psk_client_cb`, `psk_server_cb`, `session_get_cb`, or
+ `session_new_cb`. (DanielEScherzer)
. Fixed bug GH-20920 (LibreSSL build regression with PHP 8.5).
(Eugene Gvozdetsky, Theo Buehler, Jakub Zelenka)
diff --cc ext/opcache/jit/zend_jit_trace.c
index 3ba3ae56b77,fb011edf512..792fe76a0b4
--- a/ext/opcache/jit/zend_jit_trace.c
+++ b/ext/opcache/jit/zend_jit_trace.c
@@@ -2983,10 -2966,13 +2983,13 @@@ static zend_jit_reg_var* zend_jit_trace
if (support_opline
&& opline->opcode == ZEND_ASSIGN
&& opline->op1_type == IS_CV
- && ssa_op->op1_def >= 0
- && ssa->vars[ssa_op->op1_def].alias != NO_ALIAS) {
- /* avoid register allocation in case of possibility of indirect modification*/
+ && ((ssa_op->op1_def >= 0
+ && ssa->vars[ssa_op->op1_def].alias != NO_ALIAS)
+ || (p->op1_type != IS_UNKNOWN
+ && (p->op1_type & IS_TRACE_REFERENCE)))) {
+ /* avoid register allocation in case of possibility of indirect modification
+ * or assignment through a (possibly typed) reference */
- support_opline = 0;
+ support_opline = false;
}
if (ssa_op->op1_use >= 0