Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ PHP NEWS
(Ilia Alshanetsky)

- Opcache:
. Fixed a crash when the huge page SHM remap discarded mappings outside the
reserved address range. (Piotr Hałas)
. Fixed opcache.protect_memory race under ZTS. (realFlowControl)
. Fixed bug GH-23288 (Crash on restart when opcache.interned_strings_buffer
is overridden in an individual FPM pool). (David Carlier)
Expand Down
4 changes: 2 additions & 2 deletions ext/opcache/shared_alloc_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
/* to got HUGE PAGES in low 32-bit address we have to reserve address
space and then remap it using MAP_HUGETLB */

p = mmap(NULL, requested_size, flags, MAP_SHARED|MAP_ANONYMOUS|MAP_32BIT, fd, 0);
p = mmap(NULL, requested_size + huge_page_size, flags, MAP_SHARED|MAP_ANONYMOUS|MAP_32BIT, fd, 0);
if (p != MAP_FAILED) {
munmap(p, requested_size);
munmap(p, requested_size + huge_page_size);
p = (void*)(ZEND_MM_ALIGNED_SIZE_EX((ptrdiff_t)p, huge_page_size));
p = mmap(p, requested_size, flags, MAP_SHARED|MAP_ANONYMOUS|MAP_32BIT|MAP_HUGETLB|MAP_FIXED, -1, 0);
if (p != MAP_FAILED) {
Expand Down
Loading