ports/167774: [PATCH] www/xcache: add patch for upstream ticket #279

Martin Matuska mm at FreeBSD.org
Thu May 10 15:10:12 UTC 2012


>Number:         167774
>Category:       ports
>Synopsis:       [PATCH] www/xcache: add patch for upstream ticket #279
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 10 15:10:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo 9.0-STABLE FreeBSD 9.0-STABLE #1 r235218M: Thu May 10 12:01:50 CEST
>Description:
- Add patch from upstream (svn revision 900)
- Fixes upstream ticket #279 (segv on full xcache)

References:
http://xcache.lighttpd.net/ticket/279

Added file(s):
- files/patch-r900

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

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: CVS)
>How-To-Repeat:
>Fix:

--- xcache-2.0.0_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/www/xcache/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- Makefile	2 May 2012 09:52:47 -0000	1.16
+++ Makefile	10 May 2012 14:58:37 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	xcache
 DISTVERSION=	2.0.0
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://xcache.lighttpd.net/pub/Releases/${DISTVERSION}/
 
Index: files/patch-r900
===================================================================
RCS file: files/patch-r900
diff -N files/patch-r900
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-r900	10 May 2012 14:58:37 -0000
@@ -0,0 +1,48 @@
+Index: xcache.c
+===================================================================
+--- xcache.c	(revision 899)
++++ xcache.c	(revision 900)
+@@ -839,7 +839,7 @@
+ 				while (xc_stack_count(s)) {
+ 					entry_php = (xc_entry_php_t *) xc_stack_pop(s);
+ 					TRACE("unhold %d:%s", entry_php->file_inode, entry_php->entry.name.str.val);
+-					entry_php->refcount ++;
++					--entry_php->refcount;
+ 					assert(entry_php->refcount >= 0);
+ 				}
+ 			} LEAVE_LOCK(cache);
+@@ -1939,11 +1939,16 @@
+ 
+ 		if (stored_php) {
+ 			compiler->new_entry.php = stored_php;
+-			xc_php_addref_unlocked(stored_php);
+ 			xc_entry_php_init(&compiler->new_entry, compiler->opened_path TSRMLS_CC);
+ 			stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
+-			TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
+-			xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
++			if (stored_entry) {
++				xc_php_addref_unlocked(stored_php);
++				TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
++				xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
++			}
++			else {
++				gaveup = 1;
++			}
+ 			break;
+ 		}
+ 
+@@ -2021,10 +2026,11 @@
+ 		}
+ 		/* entry_store */
+ 		compiler->new_entry.php = stored_php;
+-		xc_php_addref_unlocked(stored_php);
+ 		stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
+-		if (!stored_entry) {
+-			xc_php_release_unlocked(cache, stored_php);
++		if (stored_entry) {
++			xc_php_addref_unlocked(stored_php);
++			TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
++			xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
+ 		}
+ 	} LEAVE_LOCK_EX(cache);
+ 	/* }}} */
--- xcache-2.0.0_1.patch ends here ---

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



More information about the freebsd-ports-bugs mailing list