From owner-freebsd-questions@FreeBSD.ORG Wed May 18 03:25:23 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 626BF16A4CE for ; Wed, 18 May 2005 03:25:23 +0000 (GMT) Received: from mx1.fujixerox.co.jp (mx1.fujixerox.co.jp [192.26.96.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A58543D54 for ; Wed, 18 May 2005 03:25:21 +0000 (GMT) (envelope-from Qiang.Xu@fujixerox.com) Received: from isvw1.fujixerox.co.jp ([129.249.27.131]) by mx1.fujixerox.co.jp (8.11.6p2a/3.7W) with ESMTP id j4I3P8M26818; Wed, 18 May 2005 12:25:08 +0900 (JST) Received: from ms1.fujixerox.co.jp (isvw1 [129.249.27.131]) by isvw1.fujixerox.co.jp (8.11.6p2a/3.7W) with ESMTP id j4I3P7q05930; Wed, 18 May 2005 12:25:07 +0900 (JST) Received: from sgpaphq-smtp01.fujixerox.com ([13.198.8.73]) by ms1.fujixerox.co.jp (8.11.6p2a/3.7W) with ESMTP id j4I3P6a16812; Wed, 18 May 2005 12:25:06 +0900 (JST) Received: from 10.198.8.10 by sgpaphq-smtp01.fujixerox.com with ESMTP id 50290261116386697; Wed, 18 May 2005 11:24:57 +0800 Received: from localhost (localhost [127.0.0.1]) by localhost.sgp.fujixerox.com (Postfix) with SMTP id D110B1D92E; Wed, 18 May 2005 11:18:20 +0800 (SGT) Received: from sess.xssc.sgp.xerox.com (unknown [13.198.33.122]) by imss.sgp.fujixerox.com (Postfix) with ESMTP id 34AF31D92E; Wed, 18 May 2005 11:18:12 +0800 (SGT) From: Xu Qiang To: Dan Nelson , Xu Qiang Date: Wed, 18 May 2005 11:27:32 +0800 X-Sent-Folder-Path: Sent Items X-Mailer: Oracle Connector for Outlook 9.0.4 60130 (9.0.2711) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-Id: <20050518031812.34AF31D92E@imss.sgp.fujixerox.com> cc: Giorgos Keramidas cc: freebsd-questions@freebsd.org Subject: RE: The availability of socketbits.h? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2005 03:25:23 -0000 Dan Nelson wrote: > It's usually caused by an incorrect pointer, or a stack overflow, > where the program tries to read a memory address not available to it. > In fact, I can see the problem right away. command_list is a > statically-initilized array (defined at command_list.h:55). Note that > there is no special "end-of-list" value at the end of the array. The > loop at command.c:1149 loops until command_list[i].comm_name is NULL, > but since there's no explicit NULL entry at the end, the loop falls > off the end of the array, where it eventually hits an unmapped page of > memory and gets a bus error. > = > That for loop should really read: > = > for(i=3D0; i = > , since command_count should already be set to COUNTOF(command_list) > by a previous call to command_init(). Thank you, Dan. Your fix works! Still, I wonder why the fix of Giorgos doesn't work, because it seems quite= right to me, too. (Btw, I can't understand why this software has so many bugs to be fixed bef= ore it can be compiled and run successfully. The developers don't check the= ir product before shipping out? I have compiled and installed quite a numbe= r of GNU softwares, never saw such a buggy one. Yet, I am a go game lover, = and want to set up a local NNGS server. And this is the only available open= source go server software in the world. Alas!) Regards, Xu Qiang