From 02a2ce7477aed6cfd8da5f0052e320bed483f795 Mon Sep 17 00:00:00 2001 From: ndossche <7771979+ndossche@users.noreply.github.com> Date: Mon, 26 Oct 2026 22:22:23 +0100 Subject: [PATCH] opcache: Call orig_post_shutdown_cb() This was never called and resulted in this compiler warning: ``` ./ext/opcache/ZendAccelerator.c:3720:15: warning: variable 'orig_post_shutdown_cb' set but not used [-Wunused-but-set-global] 3720 | static void (*orig_post_shutdown_cb)(void); | ^ ``` --- ext/opcache/ZendAccelerator.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index da3114ad60bb..bd37e6302722 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3427,6 +3427,11 @@ static void (*orig_post_shutdown_cb)(void); static void accel_post_shutdown(void) { + /* Call original shutdown prior to detaching SHM, so it can access its memory safely. */ + if (orig_post_shutdown_cb) { + orig_post_shutdown_cb(); + } + zend_shared_alloc_shutdown(); }