NetBSD Problem Report #44319

From www@NetBSD.org  Sun Jan  2 23:54:32 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id BAD6263B8B5
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  2 Jan 2011 23:54:32 +0000 (UTC)
Message-Id: <20110102235432.743B563B8B4@www.NetBSD.org>
Date: Sun,  2 Jan 2011 23:54:32 +0000 (UTC)
From: rumcic@gmail.com
Reply-To: rumcic@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] devel/xulrunner: pt_ConnectContinue() does not handle all situations
X-Send-Pr-Version: www-1.0

>Number:         44319
>Category:       pkg
>Synopsis:       [PATCH] devel/xulrunner: pt_ConnectContinue() does not handle all situations
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 02 23:55:00 +0000 2011
>Last-Modified:  Fri Feb 01 22:49:51 +0000 2013
>Originator:     Rumko
>Release:        /
>Organization:
/
>Environment:
DragonFly rumko.rumko.net 2.9-DEVELOPMENT DragonFly v2.9.1.351.ga55d7-DEVELOPMENT #2: Thu Dec 30 09:30:14 CET 2010     root@rumko.rumko.net:/usr/obj/usr/src/sys/MYPRECIOUS  i386
>Description:
The debug build dies with "Assertion failure: out_flags == 0, at ptio.c:1626" upon starting firefox. This is due to out_flags being set to PR_POLL_HUP, but no check is made for that condition.

The inlined patch also bumps PKGREVISION due to the package compiling with or without the patch, just not functioning correctly without it.
>How-To-Repeat:
Add debug to PKG_DEFAULT_OPTIONS and install firefox. While starting the app, it should abort with the aforementioned assert.
>Fix:
Patch available at http://www.rumko.net/pkgsrc/0001-devel-xulrunner-do-not-forget-about-PR_POLL_HUP.patch and inlined here:
From 260c3e94ea67aa800ca54ce05cc75a23d81817f1 Mon Sep 17 00:00:00 2001
From: Rumko <rumcic@gmail.com>
Date: Thu, 30 Dec 2010 23:02:12 +0100
Subject: [PATCH] devel/xulrunner: do not forget about PR_POLL_HUP

---
 devel/xulrunner/Makefile         |    1 +
 devel/xulrunner/distinfo         |    1 +
 devel/xulrunner/patches/patch-bc |   13 +++++++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 devel/xulrunner/patches/patch-bc

diff --git a/devel/xulrunner/Makefile b/devel/xulrunner/Makefile
index 16d8874..5d5cd32 100644
--- a/devel/xulrunner/Makefile
+++ b/devel/xulrunner/Makefile
@@ -2,6 +2,7 @@

 .include "dist.mk"
 PKGNAME=	xulrunner-${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
+PKGREVISION=	1
 CATEGORIES=	devel www

 MAINTAINER=	tnn@NetBSD.org
diff --git a/devel/xulrunner/distinfo b/devel/xulrunner/distinfo
index da013e2..a31aaca 100644
--- a/devel/xulrunner/distinfo
+++ b/devel/xulrunner/distinfo
@@ -31,6 +31,7 @@ SHA1 (patch-ay) = 6ddcbbd3f0197fb88622fc32d6d0fd602ec4ad34
 SHA1 (patch-az) = 5a09ccfa14fab962c4e2916f00669a1fa4a8ade4
 SHA1 (patch-ba) = 9d4058f2a3a290429b26cb8335dd5b188bccc96d
 SHA1 (patch-bb) = a764014f7aee2ecb75584ee652fd4a35ab647527
+SHA1 (patch-bc) = 92db967258b4ccd2555bfee2ddcdb75cf16d9dae
 SHA1 (patch-be) = 30d3285a10f62c7302b2c2809b1ab06bce0d3316
 SHA1 (patch-bf) = 6295d27762eb91162c00362306acbd47eeda61ac
 SHA1 (patch-bg) = ab79e04b5ac1453157cfb57754613210c74c3b90
diff --git a/devel/xulrunner/patches/patch-bc b/devel/xulrunner/patches/patch-bc
new file mode 100644
index 0000000..7c4d454
--- /dev/null
+++ b/devel/xulrunner/patches/patch-bc
@@ -0,0 +1,13 @@
+http://www.freebsd.org/cgi/query-pr.cgi?pr=140216
+
+--- nsprpub/pr/src/pthreads/ptio.c.orig	2010-12-30 22:54:16 +0100
++++ nsprpub/pr/src/pthreads/ptio.c	2010-12-30 22:54:37 +0100
+@@ -1621,7 +1621,7 @@
+         PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0);
+         return PR_FAILURE;
+     }
+-    if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0)
++    if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR | PR_POLL_HUP)) == 0)
+     {
+         PR_ASSERT(out_flags == 0);
+         PR_SetError(PR_IN_PROGRESS_ERROR, 0);
-- 
1.7.3.4


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tnn
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 03 Jan 2011 01:46:46 +0000
Responsible-Changed-Why:
Over to maintainer.


Responsible-Changed-From-To: tnn->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 01 Feb 2013 22:49:51 +0000
Responsible-Changed-Why:
Back to role account.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.