svn commit: r456288 - in head/www/php71-opcache: . files

Torsten Zuehlsdorff tz at FreeBSD.org
Thu Dec 14 11:11:28 UTC 2017


Author: tz
Date: Thu Dec 14 11:11:27 2017
New Revision: 456288
URL: https://svnweb.freebsd.org/changeset/ports/456288

Log:
  www/php71-opcache: Fix upstream bugs causing problems with nextcloud
  
  The bug floods the error logs of not only Nextcloud, but also
  Magento and some other applications. While there is already a fix
  the next PHP Release is expected at the end of January.
  
  Therefore add the upstream patches.
  
  More details can be found here:
  https://bugs.php.net/bug.php?id=75570
  https://bugs.php.net/bug.php?id=75608
  
  Reported by: Troels Just <troels at troelsjust.dk>
  MFH:         2017Q4

Added:
  head/www/php71-opcache/files/patch-Optimizer_zend__inference.c   (contents, props changed)
Modified:
  head/www/php71-opcache/Makefile

Modified: head/www/php71-opcache/Makefile
==============================================================================
--- head/www/php71-opcache/Makefile	Thu Dec 14 10:58:46 2017	(r456287)
+++ head/www/php71-opcache/Makefile	Thu Dec 14 11:11:27 2017	(r456288)
@@ -4,6 +4,7 @@ CATEGORIES=	www
 
 MASTERDIR=	${.CURDIR}/../../lang/php71
 
+PORTREVISION=	2
 PKGNAMESUFFIX=	-opcache
 
 USES=	php:zend

Added: head/www/php71-opcache/files/patch-Optimizer_zend__inference.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/php71-opcache/files/patch-Optimizer_zend__inference.c	Thu Dec 14 11:11:27 2017	(r456288)
@@ -0,0 +1,30 @@
+--- Optimizer/zend_inference.c.orig	2017-12-12 12:05:15 UTC
++++ Optimizer/zend_inference.c
+@@ -2928,7 +2928,7 @@ static int zend_update_type_info(const z
+ 			break;
+ 		case ZEND_FE_FETCH_R:
+ 		case ZEND_FE_FETCH_RW:
+-			tmp = (t2 & MAY_BE_REF);
++		    tmp = t2;
+ 			if (t1 & MAY_BE_OBJECT) {
+ 				if (opline->opcode == ZEND_FE_FETCH_RW) {
+ 					tmp |= MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+@@ -2953,7 +2953,7 @@ static int zend_update_type_info(const z
+ 			}
+ 			UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def);
+ 			if (ssa_ops[i].result_def >= 0) {
+-				tmp = 0;
++				tmp = (ssa_ops[i].result_use >= 0) ? RES_USE_INFO() : 0;
+ 				if (t1 & MAY_BE_OBJECT) {
+ 					tmp |= MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ 				}
+@@ -3079,7 +3079,8 @@ static int zend_update_type_info(const z
+ 					UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ 				} else {
+ 					/* invalid key type */
+-					UPDATE_SSA_TYPE(t1, ssa_ops[i].op1_def);
++					tmp = (tmp & (MAY_BE_RC1|MAY_BE_RCN)) | (t1 & ~(MAY_BE_RC1|MAY_BE_RCN));
++					UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ 				}
+ 				COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ 			}


More information about the svn-ports-all mailing list