Commit dbc7e01dea4 for php

commit dbc7e01dea4a8810008929a91bfe30119dae0a75
Merge: 79cd93f88ac f3ad9354735
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Wed Nov 4 08:23:03 2026 -0500

    Merge branch 'PHP-8.5' into PHP-8.6

    * PHP-8.5:
      Fix GH-25165: Tracing JIT spins once the JIT buffer is full

diff --cc NEWS
index 8346bc32cd8,0f4b77aafc7..d04ed034619
--- a/NEWS
+++ b/NEWS
@@@ -6,13 -6,32 +6,15 @@@ PH
    . Fixed curl_reset() retaining CURLOPT_PRIVATE after reset. (lacatoire)

  - Opcache:
 +  . Fixed bug GH-22216 (spurious opcache.memory_consumption warning on each new
 +    ZTS thread; the directive is also reported as 0 in worker threads).
 +    (Daisuke Komazaki)
+   . Fixed bug GH-25165 (Tracing JIT loops forever once opcache.jit_buffer_size
+     is exhausted while compiling side traces). (Ilia Alshanetsky)

 -19 Nov 2026, PHP 8.5.13
 +05 Nov 2026, PHP 8.6.0RC5

  - Core:
 -  . Fixed bug GH-24184 (System ID not being reinitialized after an Apache
 -    graceful restart, potentially causing incompatible OPcache file cache
 -    entries to be reused). (Levi Morrison)
 -  . Fixed memory leak when an exception already contains the pending exception
 -    in its previous chain. (Edmond)
 -  . Fixed bug GH-23979 (Nullsafe operator must not flush delayed oplines of an
 -    enclosing function). (ndossche)
 -  . Fixed memory manager keeping a block reallocated to exactly the size of
 -    the next smaller bin in its larger bin, which efree_size() then freed
 -    into the wrong one. (Marc Bennewitz)
 -  . Fixed bug GH-24081 (User opcode handlers resume execution against a stale
 -    frame under ZEND_VM_KIND_TAILCALL). (devnexen)
 -  . Fixed bug GH-24218 (Invalid opcode for count() of a literal array
 -    without SCCP). (lazerg)
 -  . Fix throwing behaviour with recursive arrays in VM. (ndossche)
 -  . Fixed skipped catch block when switching fibers during exception unwinding
 -    (Nicolas Grekas)
 -  . Fix escape analysis for objects implementing ArrayAccess. (ndossche, Arnaud)
 -  . Fix UAF for resolved callable zval. (EdmondDantes)
 -  . Fix memory leak for nested HTTP calls. (EdmondDantes)
    . Fix function and constant imports in compile_to_ast and add support
      for grouping. (Klaas Skelte van der Werf)
    . Fixed bug GH-24668 (zend_set_local_var() leaks the previous value of an
diff --cc ext/opcache/jit/ir/ir_x86.dasc
index 73c4d8366ef,dee5867108e..32320389960
--- a/ext/opcache/jit/ir/ir_x86.dasc
+++ b/ext/opcache/jit/ir/ir_x86.dasc
@@@ -26929,8 -12242,9 +26929,9 @@@ next_block:

  	if (ctx->code_buffer) {
  		entry = ctx->code_buffer->pos;
 -		entry = (void*)IR_ALIGNED_SIZE(((size_t)(entry)), 16);
 +		entry = (void*)IR_ALIGNED_SIZE(((size_t)(entry)), required_alignment);
  		if (size > (size_t)((char*)ctx->code_buffer->end - (char*)entry)) {
+ 			dasm_free(&data.dasm_state);
  			ctx->data = NULL;
  			ctx->status = IR_ERROR_CODE_MEM_OVERFLOW;
  			return NULL;