From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 10 15:10:11 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E88E7106564A for ; Thu, 10 May 2012 15:10:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C78548FC17 for ; Thu, 10 May 2012 15:10:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4AFABop038951 for ; Thu, 10 May 2012 15:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4AFABq8038950; Thu, 10 May 2012 15:10:11 GMT (envelope-from gnats) Resent-Date: Thu, 10 May 2012 15:10:11 GMT Resent-Message-Id: <201205101510.q4AFABq8038950@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Matuska Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0EEA1065674; Thu, 10 May 2012 15:07:12 +0000 (UTC) (envelope-from mm@neo.vx.sk) Received: from neo.vx.sk (neo.vx.sk [176.9.47.205]) by mx1.freebsd.org (Postfix) with ESMTP id 82F8D8FC12; Thu, 10 May 2012 15:07:12 +0000 (UTC) Received: by neo.vx.sk (Postfix, from userid 1001) id 7D3AC11073; Thu, 10 May 2012 17:01:32 +0200 (CEST) Message-Id: <20120510150132.7D3AC11073@neo.vx.sk> Date: Thu, 10 May 2012 17:01:32 +0200 (CEST) From: Martin Matuska To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: ale@FreeBSD.org Subject: ports/167774: [PATCH] www/xcache: add patch for upstream ticket #279 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 15:10:12 -0000 >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@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: