diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-28 12:47:56 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-28 12:47:56 +0100 |
commit | 30ee3f48d4046c48314ad4b6953dbaf54337fe6c (patch) | |
tree | 2a9e22232276db02fb32ccb652ec030a84c165cd | |
parent | 5b82fd491ac137723791ff31bcdc4e10de071100 (diff) | |
download | php-git-30ee3f48d4046c48314ad4b6953dbaf54337fe6c.tar.gz |
Fixed bug #79252
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -56,6 +56,10 @@ PHP NEWS . Fixed bug #79315 (ZipArchive::addFile doesn't honor start/length parameters). (Remi) +- Opcache: + . Fixed bug #79252 (preloading causes php-fpm to segfault during exit). + (Nikita) + 20 Feb 2020, PHP 7.4.3 - Core: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index c7d73a999a..0c8722418c 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4233,9 +4233,11 @@ static void preload_load(void) EG(persistent_classes_count) = EG(class_table)->nNumUsed; } if (CG(map_ptr_last) != ZCSG(map_ptr_last)) { + size_t old_map_ptr_last = CG(map_ptr_last); CG(map_ptr_last) = ZCSG(map_ptr_last); CG(map_ptr_size) = ZEND_MM_ALIGNED_SIZE_EX(CG(map_ptr_last) + 1, 4096); CG(map_ptr_base) = perealloc(CG(map_ptr_base), CG(map_ptr_size) * sizeof(void*), 1); + memset(CG(map_ptr_base) + old_map_ptr_last, 0, (CG(map_ptr_last) - old_map_ptr_last) * sizeof(void *)); } } |