]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorDmitry Stogov <dmitry@zend.com>
Wed, 22 May 2019 21:21:15 +0000 (00:21 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 22 May 2019 21:21:15 +0000 (00:21 +0300)
* PHP-7.3:
  Fixed race condition in opcache restart

1  2 
ext/opcache/ZendAccelerator.c

index 7824ff91609c505142d32a48d625252b3d0a8b9c,6f76fc9435f41c6050c3bac5b4b0c710f270d5e9..2162718bed30ec288124ef6cd9e9464fb7b23a6a
@@@ -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 */