From sec@42.org  Thu Feb  7 10:08:03 2008
Return-Path: <sec@42.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A5AE16A419;
	Thu,  7 Feb 2008 10:08:03 +0000 (UTC)
	(envelope-from sec@42.org)
Received: from ice.42.org (v6.42.org [IPv6:2001:608:9::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 308AE13C457;
	Thu,  7 Feb 2008 10:08:03 +0000 (UTC)
	(envelope-from sec@42.org)
Received: by ice.42.org (Postfix, from userid 1000)
	id 92003B848; Thu,  7 Feb 2008 11:08:00 +0100 (CET)
Message-Id: <20080207100800.92003B848@ice.42.org>
Date: Thu,  7 Feb 2008 11:08:00 +0100 (CET)
From: Stefan `Sec` Zehl <sec@42.org>
Reply-To: Stefan `Sec` Zehl <sec@42.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: torstenb@freebsd.org
Subject: port irc/ircII broken on amd64/7.0R [patch included]
X-Send-Pr-Version: 3.113
X-GNATS-Notify: sylvioc@gmail.com

>Number:         120340
>Category:       ports
>Synopsis:       port irc/ircII broken on amd64/7.0R [patch included]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    beech
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 07 10:10:00 UTC 2008
>Closed-Date:    Thu Feb 21 09:17:07 UTC 2008
>Last-Modified:  Thu Feb 21 09:20:01 UTC 2008
>Originator:     Stefan `Sec` Zehl
>Release:        FreeBSD 7.0-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD ice 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Wed Feb  6 12:55:25 UTC 2008     sec@ice:/usr/obj/usr/src/sys/GENERIC  amd64


	
>Description:

irc/ircII is marked broken on RELENG_7 / amd64 with
"doesn't build"

During the build process "mksiginc" core dumps because of a write outside
allocated memory.

The problem is, that it allocates an array of NSIG entries, but writes to
SIGRTMAX. At least on RELENG_7 / amd64, SIGRTMAX is way bigger than NSIG
so this (correctly) fails.

I fixed this, by increasing the array size to SIGRTMAX. ircII appears to
compile and run without any further problems after this fix.

>How-To-Repeat:
	
>Fix:

put the following patch into irc/ircII/files/patch-amd64

and remove the BROKEN= part from the Makefile :-)

--- source/mksiginc.c.orig      2004-02-16 10:00:58.000000000 +0000
+++ source/mksiginc.c   2008-02-07 09:53:07.000000000 +0000
@@ -39,7 +39,11 @@
 #define NSIG 64
 #endif
 
+#if defined(SIGRTMAX) && (SIGRTMAX > NSIG)
+#define MAXSIG SIGRTMAX+1
+#else
 #define MAXSIG NSIG+1
+#endif
 char *signames[MAXSIG];
 
 int main(int, char *[], char *[]);

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->beech 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Feb 7 10:10:08 UTC 2008 
Responsible-Changed-Why:  
beech@ wants this category PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120340 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Feb 7 10:10:11 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120340 
State-Changed-From-To: feedback->closed 
State-Changed-By: beech 
State-Changed-When: Thu Feb 21 09:16:38 UTC 2008 
State-Changed-Why:  
Committed (maintainer timeout), Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120340 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120340: commit references a PR
Date: Thu, 21 Feb 2008 09:16:15 +0000 (UTC)

 beech       2008-02-21 09:16:11 UTC
 
   FreeBSD ports repository
 
   Modified files:
     irc/ircII            Makefile 
   Added files:
     irc/ircII/files      patch-source_mksiginc.c 
   Log:
   - Fix build with amd64/7.x
   
   PR:             ports/120340
   Submitted by:   Stefan `Sec` Zehl <sec@42.org>
   Approved by:    maintainer timeout (two weeks)
   
   Revision  Changes    Path
   1.49      +2 -7      ports/irc/ircII/Makefile
   1.1       +15 -0     ports/irc/ircII/files/patch-source_mksiginc.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
