From: Dmitry Stogov Date: Wed, 22 May 2019 21:21:15 +0000 (+0300) Subject: Merge branch 'PHP-7.3' into PHP-7.4 X-Git-Tag: php-7.4.0alpha1~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5de750f41c1ee3ed834ebf4f811ba03a6cc2d9bc;p=php Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Fixed race condition in opcache restart --- 5de750f41c1ee3ed834ebf4f811ba03a6cc2d9bc diff --cc ext/opcache/ZendAccelerator.c index 7824ff9160,6f76fc9435..2162718bed --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@@ -2273,12 -2308,15 +2273,10 @@@ static void accel_reset_pcre_cache(void } ZEND_HASH_FOREACH_END(); } -static void accel_activate(void) +int accel_activate(INIT_FUNC_ARGS) { - zend_bool reset_pcre = 0; - if (!ZCG(enabled) || !accel_startup_ok) { - return; - } - - if (!ZCG(function_table).nTableSize) { - zend_hash_init(&ZCG(function_table), zend_hash_num_elements(CG(function_table)), NULL, ZEND_FUNCTION_DTOR, 1); - zend_accel_copy_internal_functions(); + return SUCCESS; } /* PHP-5.4 and above return "double", but we use 1 sec precision */