summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-03-12 11:18:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-03-12 11:18:12 +0300
commitf31c4d5398b0741cbb9cc389a96d6ceff5aa5219 (patch)
treee8edb0c0a55e271c9b55ff579a0548c5f3265f6d
parent01ea314e8cfd6c1c6a2c7db9e13be1f581f5d0a1 (diff)
downloadphp-git-f31c4d5398b0741cbb9cc389a96d6ceff5aa5219.tar.gz
Replaced usafe reference from SHM to process memory with SHM to SHM reference
-rw-r--r--ext/opcache/zend_file_cache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c
index 2c4fa18c4e..213028b7a1 100644
--- a/ext/opcache/zend_file_cache.c
+++ b/ext/opcache/zend_file_cache.c
@@ -893,7 +893,11 @@ static void zend_file_cache_unserialize_hash(HashTable *ht,
ht->pDestructor = dtor;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
- HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
+ if (EXPECTED(!file_cache_only)) {
+ HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
+ } else {
+ HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
+ }
return;
}
if (IS_UNSERIALIZED(ht->arData)) {