From e270ee3008829fa50142ff39b2f6e5d2fa9cc665 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 23 Oct 2023 12:10:11 +0300 Subject: [PATCH] memory_consumption must be page aligned --- ext/opcache/zend_accelerator_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 3d4a9f8c687..2c6f14f9ea5 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -71,7 +71,7 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption) return FAILURE; } if (UNEXPECTED(memsize > ZEND_LONG_MAX / (1024 * 1024))) { - *p = ZEND_LONG_MAX; + *p = ZEND_LONG_MAX & ~(1024 * 1024 - 1); } else { *p = memsize * (1024 * 1024); }