From owner-freebsd-questions@FreeBSD.ORG Mon Oct 27 20:08:04 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F12B11065671 for ; Mon, 27 Oct 2008 20:08:04 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA01.westchester.pa.mail.comcast.net (qmta01.westchester.pa.mail.comcast.net [76.96.62.16]) by mx1.freebsd.org (Postfix) with ESMTP id 804B98FC18 for ; Mon, 27 Oct 2008 20:07:53 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA14.westchester.pa.mail.comcast.net ([76.96.62.60]) by QMTA01.westchester.pa.mail.comcast.net with comcast id XqNv1a00N1HzFnQ51w7rVj; Mon, 27 Oct 2008 20:07:51 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA14.westchester.pa.mail.comcast.net with comcast id Xw7p1a00E2P6wsM3aw7puQ; Mon, 27 Oct 2008 20:07:50 +0000 X-Authority-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=XYh64lbDf2ofeUqj440A:9 a=IaPLs5Z3WF76sdrdxZwbe0ux6HwA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 15122C9419; Mon, 27 Oct 2008 13:07:49 -0700 (PDT) Date: Mon, 27 Oct 2008 13:07:49 -0700 From: Jeremy Chadwick To: clemens fischer Message-ID: <20081027200749.GB29814@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: reviving games/freebsd-games X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 20:08:05 -0000 On Mon, Oct 27, 2008 at 08:53:46PM +0100, clemens fischer wrote: > Some of the programs in games/freebsd-games, notably hack and larn, have > the following problem: Given the declarations: > > char *scrollname[] = { char *potionname[] = { > "\0enchant armor", "\0sleep", > "\0enchant weapon", "\0healing", > ... ... > "\0 " "\0 " > }; }; > > (in larn/data.c) the code continues to flag the availability of some > scroll or potion by writing into the first byte of the strings in these > arrays: > > for (i=0; i for (i=0; i > This leads to SIGSEGV crashes. I think this came about with the gcc-4xx > series of our compiler, but I'm not really sure. I verified that > scrollname and potionname reside in the writable .data segment. The > segv is reproducable. Does anybody know what is wrong with this code? > I assume i could arrange for the flagging to be done in a separate data > structure, but since the programs worked for years this way, I think > there should be an easier way. You've already filed a PR on this? ports/127728. Though that PR encapsulates two or 3 different things, which isn't good. Secondly, there have been complaints about similar issues in the past. http://lists.freebsd.org/pipermail/freebsd-ports/2008-January/046245.html http://lists.freebsd.org/pipermail/freebsd-ports/2008-March/047244.html I think the bottom line here is that until someone steps up and actually volunteers to fix the code, it will remain broken. (I don't normally tote this attitude, but in this case it's applicable: this is a volunteer project! :-) ) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |