Prevent possible incorrect optimization caused by ZEND_ASSUME()

This commit is contained in:
Dmitry Stogov 2024-08-29 23:10:34 +03:00
parent c15bb9afe2
commit bf98023f1a
No known key found for this signature in database

View File

@ -357,8 +357,6 @@ static size_t zend_shared_alloc_get_largest_free_block(void)
void *zend_shared_alloc(size_t size)
{
ZEND_ASSERT(ZCG(locked));
int i;
unsigned int block_size = ZEND_ALIGNED_SIZE(size);
@ -368,6 +366,7 @@ void *zend_shared_alloc(size_t size)
#if 1
if (!ZCG(locked)) {
ZEND_ASSERT(0 && "Shared memory lock not obtained");
zend_accel_error_noreturn(ACCEL_LOG_ERROR, "Shared memory lock not obtained");
}
#endif