From: Anatol Belski Date: Thu, 24 Sep 2015 10:46:54 +0000 (+0200) Subject: move accel_shared_globals assignment into locked block X-Git-Tag: php-7.0.0RC4~4^2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ef3d80f2594c7bfb8c1d718a4a17f34f0e67e4f;p=php move accel_shared_globals assignment into locked block this might fix crashes under high concurrency --- diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 2bbfb44481..c09b08d9b8 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2630,8 +2630,8 @@ static int accel_startup(zend_extension *extension) zend_accel_error(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - probably not enough shared memory."); return SUCCESS; case SUCCESSFULLY_REATTACHED: - accel_shared_globals = (zend_accel_shared_globals *) ZSMMG(app_shared_globals); zend_shared_alloc_lock(); + accel_shared_globals = (zend_accel_shared_globals *) ZSMMG(app_shared_globals); orig_new_interned_string = zend_new_interned_string; orig_interned_strings_snapshot = zend_interned_strings_snapshot; orig_interned_strings_restore = zend_interned_strings_restore;