Skip to content

Commit 9c5cf65

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Prevent potential deadlock if accelerated globals cannot be allocated
2 parents ca8dab3 + 8b1d352 commit 9c5cf65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2870,10 +2870,10 @@ static zend_result zend_accel_init_shm(void)
28702870

28712871
accel_shared_globals = zend_shared_alloc(accel_shared_globals_size);
28722872
if (!accel_shared_globals) {
2873+
zend_shared_alloc_unlock();
28732874
zend_accel_error_noreturn(ACCEL_LOG_FATAL,
28742875
"Insufficient shared memory for interned strings buffer! (tried to allocate %zu bytes)",
28752876
accel_shared_globals_size);
2876-
zend_shared_alloc_unlock();
28772877
return FAILURE;
28782878
}
28792879
memset(accel_shared_globals, 0, sizeof(zend_accel_shared_globals));

0 commit comments

Comments
 (0)