Commit b6b869b4203 for php
commit b6b869b42035d373650e9599c277a22025b31517
Merge: f8d0a604e9a 9a11b35a16f
Author: David Carlier <devnexen@gmail.com>
Date: Mon Sep 28 15:18:42 2026 +0100
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
Fix GH-23637: opcache inheritance cache entry published too early
diff --cc ext/opcache/ZendAccelerator.c
index 5786a93ac96,4a543999bee..da852f0ce79
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@@ -2693,12 -2479,13 +2697,13 @@@ static zend_class_entry* zend_accel_inh
JIT_G(on) = jit_on_old;
#endif
- entry->num_warnings = EG(num_errors);
- entry->warnings = zend_persist_warnings(EG(num_errors), EG(errors));
+ entry->num_warnings = EG(errors).size;
+ entry->warnings = zend_persist_warnings(EG(errors).size, EG(errors).errors);
entry->next = proto->inheritance_cache;
- proto->inheritance_cache = entry;
ZCSG(map_ptr_last) = CG(map_ptr_last);
+ ZEND_ATOMIC_FENCE_RELEASE();
+ proto->inheritance_cache = entry;
zend_shared_alloc_destroy_xlat_table();