ports/75737: [PATCH] lang/php4: fix for crashing with overloaded objects

Toni Viemero toni.viemero at iki.fi
Mon Jan 3 06:10:16 UTC 2005


>Number:         75737
>Category:       ports
>Synopsis:       [PATCH] lang/php4: fix for crashing with overloaded objects
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 03 06:10:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Toni Viemero
>Release:        FreeBSD 4.11-RC1 i386
>Organization:
>Environment:
System: FreeBSD shaolin.selfdestruct.net 4.11-RC1 FreeBSD 4.11-RC1 #1: Sun Dec 19 17:07:01 EET 2004
>Description:
Attached patch is taken from PHP CVS and fixes PHP bug #31106, crashing
with overloaded objects.

http://bugs.php.net/31106
http://cvs.php.net/diff.php/Zend/Attic/zend_execute.c?sa=1&r1=1.316.2.42&r2=1.316.2.43&ty=u

Added file(s):
- files/patch-Zend::zend_execute.c

Port maintainer (ale at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- php4-4.3.10_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/lang/php4/Makefile /home/toni/ports/php4/Makefile
--- /usr/ports/lang/php4/Makefile	Thu Dec 16 13:37:23 2004
+++ /home/toni/ports/php4/Makefile	Tue Dec 28 15:00:39 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	php4
 PORTVERSION=	4.3.10
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	lang devel www
 MASTER_SITES=	${MASTER_SITE_PHP:S,$,:release,} \
 		http://downloads.php.net/ilia/:rc \
diff -ruN --exclude=CVS /usr/ports/lang/php4/files/patch-Zend::zend_execute.c /home/toni/ports/php4/files/patch-Zend::zend_execute.c
--- /usr/ports/lang/php4/files/patch-Zend::zend_execute.c	Thu Jan  1 02:00:00 1970
+++ /home/toni/ports/php4/files/patch-Zend::zend_execute.c	Tue Dec 28 15:04:38 2004
@@ -0,0 +1,13 @@
+--- Zend/zend_execute.c.orig	Tue Dec 28 15:03:55 2004
++++ Zend/zend_execute.c	Tue Dec 28 15:03:57 2004
+@@ -1577,6 +1577,10 @@
+ 									EX(Ts)[EX(opline)->op1.u.var].EA.data.overloaded_element.elements_list = (zend_llist *) emalloc(sizeof(zend_llist));
+ 									zend_llist_init(EX(Ts)[EX(opline)->op1.u.var].EA.data.overloaded_element.elements_list, sizeof(zend_overloaded_element), NULL, 0);
+ 									EX(object).ptr->refcount++;
++									/* is-ref needed so that assign to this in call won't separate it */
++									if(EX(object).ptr->refcount > 1) {
++										EX(object).ptr->is_ref = 1;
++									}
+ 								}
+ 								zend_llist_add_element(EX(Ts)[EX(opline)->op1.u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
+ 								EX(fbc) = (zend_function *) emalloc(sizeof(zend_function));
--- php4-4.3.10_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list