Commit f854ff9218c for php

commit f854ff9218c9c1a486f520a19b037d389cf5c49d
Author: lazerg <lazerg2@gmail.com>
Date:   Thu Nov 5 06:09:20 2026 +0500

    Fix GH-25195: smm_shared_globals left dangling without an SHM backend

    Closes GH-25196.

diff --git a/NEWS b/NEWS
index c6712bfdb68..3cd0dcfc86d 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,8 @@ PHP                                                                        NEWS
     (waroad)
   . Fixed bug GH-25037 (Function JIT ENTRY live var assertion).
     (Ilia Alshanetsky)
+  . Fixed bug GH-25195 (smm_shared_globals left dangling without an
+    SHM backend). (Lazizbek Ergashev)

 - SOAP:
   . Fixed bug GH-25267 (NULL dereference in to_xml_any() with integer key).
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index 986fa52a146..3167e40249b 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -240,6 +240,7 @@ int zend_shared_alloc_startup(size_t requested_size, size_t reserved_size)
 	if (!g_shared_alloc_handler) {
 		/* try memory handlers in order */
 		if (handler_table->name == NULL) {
+			smm_shared_globals = NULL;
 			return NO_SHM_BACKEND;
 		}
 		for (he = handler_table; he->name; he++) {