summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-11-30 07:21:07 +0100
committerRemi Collet <fedora@famillecollet.com>2015-11-30 07:21:07 +0100
commit19e0899efcba24f1c120e824baa39ef56b3ee1d5 (patch)
treef9d58190adfb0fb86067fbc3b83223ab4351a595
parent05c54474ecb91b7872f948db37d63743d09307b4 (diff)
php 7: set opcache.huge_code_pages=0 on EL-6
-rw-r--r--php-upstream.patch58
-rw-r--r--php70.spec11
2 files changed, 6 insertions, 63 deletions
diff --git a/php-upstream.patch b/php-upstream.patch
deleted file mode 100644
index b90cd03..0000000
--- a/php-upstream.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- a/ext/opcache/ZendAccelerator.c 2015-11-25 05:04:23.000000000 +0100
-+++ b/ext/opcache/tmp/ZendAccelerator.c 2015-11-27 12:38:07.806097341 +0100
-@@ -2515,6 +2515,8 @@
- MAP_PRIVATE | MAP_ANONYMOUS,
- -1, 0);
- if (mem == MAP_FAILED) {
-+ zend_error(E_WARNING,
-+ ACCELERATOR_PRODUCT_NAME " huge_code_pages: mmap failed: %s (%d)", strerror(errno), errno);
- return -1;
- }
- memcpy(mem, start, size);
-@@ -2525,17 +2527,42 @@
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_HUGETLB,
- -1, 0);
- # endif
--# ifdef MADV_HUGEPAGE
- if (ret == MAP_FAILED) {
-+# ifdef MADV_HUGEPAGE
- ret = mmap(start, size,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
- -1, 0);
-- madvise(start, size, MADV_HUGEPAGE);
-- }
-+ if (ret == MAP_FAILED) {
-+ zend_error(E_WARNING,
-+ ACCELERATOR_PRODUCT_NAME " huge_code_pages: mmap(FIXED) failed: %s (%d)",
-+ strerror(errno), errno);
-+ munmap(mem, size);
-+ return -1;
-+ }
-+ if (-1 == madvise(start, size, MADV_HUGEPAGE)) {
-+ zend_error(E_WARNING,
-+ ACCELERATOR_PRODUCT_NAME " huge_code_pages: madvise(HUGEPAGE) failed: %s (%d)",
-+ strerror(errno), errno);
-+ munmap(mem, size);
-+ return -1;
-+ }
-+# else
-+ ret = mmap(start, size,
-+ PROT_READ | PROT_WRITE | PROT_EXEC,
-+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
-+ if (ret == MAP_FAILED) {
-+ /* this should never happen */
-+ }
-+ memcpy(start, mem, size);
-+ zend_error(E_WARNING,
-+ ACCELERATOR_PRODUCT_NAME "huge_code_pages: mmap(HUGETLB) failed: %s (%d)", strerror(errno), errno);
-+ return -1;
- # endif
-+ }
-+
- if (ret == start) {
-- memcpy(start, mem, size);
-+ memcpy(start, mem, size);
- mprotect(start, size, PROT_READ | PROT_EXEC);
- }
- munmap(mem, size);
diff --git a/php70.spec b/php70.spec
index 1487fd4..2056cee 100644
--- a/php70.spec
+++ b/php70.spec
@@ -133,7 +133,7 @@
%endif
%global rcver RC8
-%global rpmrel 15
+%global rpmrel 16
Summary: PHP scripting language for creating dynamic web sites
Name: php
@@ -192,7 +192,6 @@ Patch47: php-5.6.3-phpinfo.patch
Patch91: php-5.6.3-oci8conf.patch
# Upstream fixes (100+)
-Patch100: php-upstream.patch
# Security fixes (200+)
@@ -969,7 +968,6 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1
%patch91 -p1 -b .remi-oci8
# upstream patches
-%patch100 -p1 -b .upstream
# security patches
@@ -1107,8 +1105,10 @@ echo "d /run/php-fpm 755 root root" >php-fpm.tmpfiles
# Some extensions have their own configuration file
cp %{SOURCE50} 10-opcache.ini
%ifarch x86_64
+%if 0%{?rhel} != 6
sed -e '/opcache.huge_code_pages/s/0/1/' -i 10-opcache.ini
%endif
+%endif
cp %{SOURCE52} 20-oci8.ini
# Regenerated bison files
@@ -2006,8 +2006,9 @@ fi
%changelog
-* Fri Nov 27 2015 Remi Collet <remi@fedoraproject.org> 7.0.0-0.15.RC8
-- test build
+* Mon Nov 30 2015 Remi Collet <remi@fedoraproject.org> 7.0.0-0.16.RC8
+- set opcache.huge_code_pages=0 on EL-6
+ see https://bugs.php.net/70973 and https://bugs.php.net/70977
* Wed Nov 25 2015 Remi Collet <remi@fedoraproject.org> 7.0.0-0.12.RC8
- Update to 7.0.0RC8