diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index c19d72c63b7..3901fc9c840 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -371,6 +371,11 @@ void *zend_shared_alloc(size_t size) int i; size_t block_size = ZEND_ALIGNED_SIZE(size); +#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;