From b50b277e70c42ad4e1a34821f75f545b761038b5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 Aug 2018 15:52:00 +0200 Subject: add upstream patch for F29 --- failed.txt | 31 +------------------------------ php-upstream.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ php.spec | 7 ++++++- 3 files changed, 60 insertions(+), 31 deletions(-) create mode 100644 php-upstream.patch diff --git a/failed.txt b/failed.txt index 470bc5c..7d76e82 100644 --- a/failed.txt +++ b/failed.txt @@ -6,15 +6,11 @@ $ grep -r 'Tests failed' /var/lib/mock/scl73*/build.log /var/lib/mock/scl72el7x/build.log:Tests failed : 0 /var/lib/mock/scl72fc27x/build.log:Tests failed : 0 /var/lib/mock/scl72fc28x/build.log:Tests failed : 0 -/var/lib/mock/scl73fc29x/build.log:Tests failed : 5 +/var/lib/mock/scl73fc29x/build.log:Tests failed : 1 fc29x - Bug #40261 (Extremely slow data handling due to memory fragmentation) [Zend/tests/bug40261.phpt] - Stress test $x .= $x [Zend/tests/concat_002.phpt] security_level setting to prohibit cert [ext/openssl/tests/stream_security_level.phpt] - Test array_sum() [ext/standard/tests/array/array_sum.phpt] - Bug #62373 (serialize() generates wrong reference to the object) [ext/standard/tests/serialize/bug62373.phpt] (1) proc_open give erratic test results :( @@ -25,33 +21,8 @@ fc29x FAILED TEST SUMMARY --------------------------------------------------------------------- -Bug #40261 (Extremely slow data handling due to memory fragmentation) [Zend/tests/bug40261.phpt] -Stress test $x .= $x [Zend/tests/concat_002.phpt] security_level setting to prohibit cert [ext/openssl/tests/stream_security_level.phpt] -Test array_sum() [ext/standard/tests/array/array_sum.phpt] -Bug #62373 (serialize() generates wrong reference to the object) [ext/standard/tests/serialize/bug62373.phpt] ===================================================================== -BUILDSTDERR: make: *** [Makefile:203: test] Error 1 -+ set +x -TEST FAILURE: ../Zend/tests/concat_002.diff -- -001+ zend_mm_heap corrupted -001- int(33554432) -002- Done --- ../Zend/tests/concat_002.diff result ends. -TEST FAILURE: ../Zend/tests/bug40261.diff -- -001+ Termsig=11 -001- ok --- ../Zend/tests/bug40261.diff result ends. -TEST FAILURE: ../ext/standard/tests/array/array_sum.diff -- -003+ -004+ Termsig=11 -003- %st(5000050000) -004- %st(5000050000) --- ../ext/standard/tests/array/array_sum.diff result ends. -TEST FAILURE: ../ext/standard/tests/serialize/bug62373.diff -- -002+ -003+ Termsig=11 --- ../ext/standard/tests/serialize/bug62373.diff result ends. TEST FAILURE: ../ext/openssl/tests/stream_security_level.diff -- 002+ error:141A90B5:SSL routines:ssl_cipher_list_to_bytes:no ciphers available in /builddir/build/BUILD/php-7.3.0beta3/ext/openssl/tests/ServerClientTestCase.inc(96) : eval()'d code on line 11 002- error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in %s : eval()'d code on line %d diff --git a/php-upstream.patch b/php-upstream.patch new file mode 100644 index 0000000..0a11cbe --- /dev/null +++ b/php-upstream.patch @@ -0,0 +1,53 @@ +From 8cc7e2a2df912d86f6b9dc3f3d40e5de1d93214b Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 29 Aug 2018 14:40:59 +0200 +Subject: [PATCH] Revert "Don't report mmap failure if it is expected" + +This reverts commit 446b5b15d324dacd30f58313563a9d625fb54ac8. +--- + Zend/zend_alloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c +index d81616a87a4b..8eec54c6f703 100644 +--- a/Zend/zend_alloc.c ++++ b/Zend/zend_alloc.c +@@ -432,7 +432,7 @@ static void *zend_mm_mmap_fixed(void *addr, size_t size) + void *ptr = mmap(addr, size, PROT_READ | PROT_WRITE, flags /*| MAP_POPULATE | MAP_HUGETLB*/, -1, 0); + + if (ptr == MAP_FAILED) { +-#if ZEND_MM_ERROR && !defined(MAP_FIXED_NOREPLACE) && !defined(MAP_EXCL) ++#if ZEND_MM_ERROR + fprintf(stderr, "\nmmap() failed: [%d] %s\n", errno, strerror(errno)); + #endif + return NULL; +From a55bcaa14ddba2df0c0f9c7f4444fc9d9f6564fd Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 29 Aug 2018 14:41:04 +0200 +Subject: [PATCH] Revert "Support fixed address mmap without replacement" + +This reverts commit 0f68ff5c92924deb9401ce66458e67f250ccde74. +--- + Zend/zend_alloc.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c +index 8eec54c6f703..11691d837759 100644 +--- a/Zend/zend_alloc.c ++++ b/Zend/zend_alloc.c +@@ -423,13 +423,8 @@ static void *zend_mm_mmap_fixed(void *addr, size_t size) + #ifdef _WIN32 + return VirtualAlloc(addr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + #else +- int flags = MAP_PRIVATE | MAP_ANON; +-#ifdef MAP_FIXED_NOREPLACE +- flags |= MAP_FIXED_NOREPLACE; +-#elif defined MAP_EXCL +- flags |= MAP_FIXED | MAP_EXCL; +-#endif +- void *ptr = mmap(addr, size, PROT_READ | PROT_WRITE, flags /*| MAP_POPULATE | MAP_HUGETLB*/, -1, 0); ++ /* MAP_FIXED leads to discarding of the old mapping, so it can't be used. */ ++ void *ptr = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON /*| MAP_POPULATE | MAP_HUGETLB*/, -1, 0); + + if (ptr == MAP_FAILED) { + #if ZEND_MM_ERROR diff --git a/php.spec b/php.spec index be40984..f973036 100644 --- a/php.spec +++ b/php.spec @@ -130,7 +130,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 2%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -183,6 +183,7 @@ Patch47: php-5.6.3-phpinfo.patch Patch91: php-7.2.0-oci8conf.patch # Upstream fixes (100+) +Patch100: php-upstream.patch # Security fixes (200+) @@ -923,6 +924,7 @@ low-level PHP extension for the libsodium cryptographic library. %patch91 -p1 -b .remi-oci8 # upstream patches +%patch100 -p1 -b .up # security patches @@ -1857,6 +1859,9 @@ fi %changelog +* Tue Aug 28 2018 Remi Collet - 7.3.0~beta3-2 +- add upstream patch for F29 + * Tue Aug 28 2018 Remi Collet - 7.3.0~beta3-1 - update to 7.3.0beta3 -- cgit