]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.2' into PHP-7.3
authorDmitry Stogov <dmitry@zend.com>
Tue, 14 May 2019 11:54:30 +0000 (14:54 +0300)
committerDmitry Stogov <dmitry@zend.com>
Tue, 14 May 2019 11:54:30 +0000 (14:54 +0300)
* PHP-7.2:
  Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset

1  2 
NEWS
ext/opcache/ZendAccelerator.c
ext/opcache/ZendAccelerator.h
ext/opcache/zend_accelerator_module.c

diff --cc NEWS
Simple merge
index f09542927065f65bb1a66f69e403c138196ccbfb,34e4ef0071c46c6141bd44f8414c2515f1535011..a8ea054d4391b2e8405d3d5400bebce79da5c111
@@@ -2203,9 -2057,9 +2203,9 @@@ static int persistent_stream_open_funct
  }
  
  /* zend_resolve_path() replacement for PHP 5.3 and above */
 -static zend_string* persistent_zend_resolve_path(const char *filename, int filename_len)
 +static zend_string* persistent_zend_resolve_path(const char *filename, size_t filename_len)
  {
-       if (ZCG(enabled) && accel_startup_ok &&
+       if (
  #ifdef HAVE_OPCACHE_FILE_CACHE
                !file_cache_only &&
  #endif
@@@ -2357,8 -2210,9 +2356,9 @@@ static void accel_activate(void
                                if (ZCG(root_hash) != buf.st_ino) {
                                        zend_string *key = zend_string_init("opcache.enable", sizeof("opcache.enable")-1, 0);
                                        zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
 -                                      zend_string_release(key);
 +                                      zend_string_release_ex(key, 0);
                                        zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode");
+                                       ZCG(accelerator_enabled) = 0;
                                        return;
                                }
                        }
@@@ -2459,13 -2318,9 +2464,9 @@@ static void accel_deactivate(void
         */
  
        if (ZCG(cwd)) {
 -              zend_string_release(ZCG(cwd));
 +              zend_string_release_ex(ZCG(cwd), 0);
                ZCG(cwd) = NULL;
        }
-       if (!ZCG(enabled) || !accel_startup_ok) {
-               return;
-       }
  }
  
  static int accelerator_remove_cb(zend_extension *element1, zend_extension *element2)
Simple merge
Simple merge