Skip to content

Commit 30ee3f4

Browse files
committed
Fixed bug #79252
1 parent 5b82fd4 commit 30ee3f4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ PHP NEWS
5656
. Fixed bug #79315 (ZipArchive::addFile doesn't honor start/length
5757
parameters). (Remi)
5858

59+
- Opcache:
60+
. Fixed bug #79252 (preloading causes php-fpm to segfault during exit).
61+
(Nikita)
62+
5963
20 Feb 2020, PHP 7.4.3
6064

6165
- Core:

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4233,9 +4233,11 @@ static void preload_load(void)
42334233
EG(persistent_classes_count) = EG(class_table)->nNumUsed;
42344234
}
42354235
if (CG(map_ptr_last) != ZCSG(map_ptr_last)) {
4236+
size_t old_map_ptr_last = CG(map_ptr_last);
42364237
CG(map_ptr_last) = ZCSG(map_ptr_last);
42374238
CG(map_ptr_size) = ZEND_MM_ALIGNED_SIZE_EX(CG(map_ptr_last) + 1, 4096);
42384239
CG(map_ptr_base) = perealloc(CG(map_ptr_base), CG(map_ptr_size) * sizeof(void*), 1);
4240+
memset(CG(map_ptr_base) + old_map_ptr_last, 0, (CG(map_ptr_last) - old_map_ptr_last) * sizeof(void *));
42394241
}
42404242
}
42414243

0 commit comments

Comments
 (0)