diff options
-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 *)); } } |