summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/opcache/shared_alloc_mmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/opcache/shared_alloc_mmap.c b/ext/opcache/shared_alloc_mmap.c
index 3d2884e948..c30a3b483c 100644
--- a/ext/opcache/shared_alloc_mmap.c
+++ b/ext/opcache/shared_alloc_mmap.c
@@ -44,6 +44,9 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
#ifdef PROT_MPROTECT
flags |= PROT_MPROTECT(PROT_EXEC);
#endif
+#ifdef PROT_MAX
+ flags |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC);
+#endif
#ifdef MAP_HUGETLB
size_t huge_page_size = 2 * 1024 * 1024;