From c15bb9afe26bbd5e21d6fe69261f16cf805fc5a6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 29 Aug 2024 16:59:14 +0300 Subject: [PATCH] Restore error message incorrectly removed by commit 10d43c4 (related to GH-15497) --- ext/opcache/zend_shared_alloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index 6354c2e15ea..20854adcaaf 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -366,6 +366,11 @@ void *zend_shared_alloc(size_t size) zend_accel_error_noreturn(ACCEL_LOG_ERROR, "Possible integer overflow in shared memory allocation (%zu + %zu)", size, PLATFORM_ALIGNMENT); } +#if 1 + if (!ZCG(locked)) { + zend_accel_error_noreturn(ACCEL_LOG_ERROR, "Shared memory lock not obtained"); + } +#endif if (block_size > ZSMMG(shared_free)) { /* No hope to find a big-enough block */ SHARED_ALLOC_FAILED(); return NULL;