diff options
author | Joe Watkins <krakjoe@php.net> | 2019-06-18 10:27:50 +0200 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-06-18 10:27:50 +0200 |
commit | 41067a22e91b6a31b9910e1fa83531deb225c343 (patch) | |
tree | 0d7b2394e2f2883f8955e511e8a8cab6df6b4fdc /ext/opcache/zend_file_cache.c | |
parent | 837f384b7202bd61e54a412557fceabdd96252db (diff) | |
parent | 04a6aac59beaac2ef2e91b9e3c07299f7321eae7 (diff) | |
download | php-git-41067a22e91b6a31b9910e1fa83531deb225c343.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Turn system_id into a true global
Diffstat (limited to 'ext/opcache/zend_file_cache.c')
-rw-r--r-- | ext/opcache/zend_file_cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index a2fd2c4614..c98b937418 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -798,7 +798,7 @@ static void zend_file_cache_serialize(zend_persistent_script *script, zend_persistent_script *new_script; memcpy(info->magic, "OPCACHE", 8); - memcpy(info->system_id, ZCG(system_id), 32); + memcpy(info->system_id, accel_system_id, 32); info->mem_size = script->size; info->str_size = 0; info->script_offset = (char*)script - (char*)script->mem; @@ -827,7 +827,7 @@ static char *zend_file_cache_get_bin_file_path(zend_string *script_path) filename = emalloc(len + 33 + ZSTR_LEN(script_path) + sizeof(SUFFIX)); memcpy(filename, ZCG(accel_directives).file_cache, len); filename[len] = '/'; - memcpy(filename + len + 1, ZCG(system_id), 32); + memcpy(filename + len + 1, accel_system_id, 32); memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path)); memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX)); #else @@ -859,7 +859,7 @@ static char *zend_file_cache_get_bin_file_path(zend_string *script_path) len += 32; filename[len] = '\\'; - memcpy(filename + len + 1, ZCG(system_id), 32); + memcpy(filename + len + 1, accel_system_id, 32); if (ZSTR_LEN(script_path) >= 7 && ':' == ZSTR_VAL(script_path)[4] && '/' == ZSTR_VAL(script_path)[5] && '/' == ZSTR_VAL(script_path)[6]) { /* phar:// or file:// */ @@ -1557,7 +1557,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl efree(filename); return NULL; } - if (memcmp(info.system_id, ZCG(system_id), 32) != 0) { + if (memcmp(info.system_id, accel_system_id, 32) != 0) { zend_accel_error(ACCEL_LOG_WARNING, "opcache cannot read from file '%s' (wrong \"system_id\")\n", filename); zend_file_cache_flock(fd, LOCK_UN); close(fd); |