Skip to content

Commit dc6fbec

Browse files
authored
Fix missing zend_shared_alloc_unlock() (#10405)
This code was refactored and the unlock was forgotten. The following assertion is triggered in debug mode: zend_shared_alloc_lock: Assertion `!(accel_globals.locked)' failed. And in release mode this likely deadlocks. Fix this by re-adding the unlock.
1 parent 479b47c commit dc6fbec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/ZendAccelerator.c

+3
Original file line numberDiff line numberDiff line change
@@ -4788,6 +4788,7 @@ static int accel_finish_startup(void)
47884788
}
47894789

47904790
if (pid == -1) { /* no subprocess was needed */
4791+
/* The called function unlocks the shared alloc lock */
47914792
return accel_finish_startup_preload(false);
47924793
} else if (pid == 0) { /* subprocess */
47934794
int ret = accel_finish_startup_preload(true);
@@ -4805,6 +4806,8 @@ static int accel_finish_startup(void)
48054806
preload_load();
48064807
}
48074808

4809+
zend_shared_alloc_unlock();
4810+
48084811
if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
48094812
return SUCCESS;
48104813
} else {

0 commit comments

Comments
 (0)