From owner-freebsd-ports@FreeBSD.ORG Sun Apr 18 09:45:48 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 687E016A4CE for ; Sun, 18 Apr 2004 09:45:48 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13D8343D39 for ; Sun, 18 Apr 2004 09:45:48 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i3IGjktf025324; Sun, 18 Apr 2004 12:45:46 -0400 (EDT) Date: Sun, 18 Apr 2004 12:45:46 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: "Conrad J. Sabatier" In-Reply-To: <20040418094524.GA21479@cox.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: xmcd Author cc: freebsd-ports@freebsd.org Subject: Re: xmcd now requires ATAPICAM for IDE CD-ROM? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2004 16:45:48 -0000 On Sun, 18 Apr 2004, Conrad J. Sabatier wrote: > The latest version of xmcd segfaults when I try to run cda (under > FreeBSD 5.2-CURRENT), just after reading (or attempting to read) > /etc/nsswitch.conf, it looks like. > > I'm not using ATAPICAM in my kernel, but browsing through the port, it looks > like there may be a dependency on CAM(?). > > Any ideas, anyone? It seems to segfault at cdinfo_d/cdinfo_x.c at line 3177: if (newmenu) { -> if (cdinfo_dbp->wwwwarp_list == NULL) cdinfo_dbp->wwwwarp_list = wp1 = wp; else { wp1->nextmenu = wp; wp1 = wp; } } with a null pointer dereference. I poked around a little and cdinfo_dbp is setup by calling cdinfo_init() which seems to be done after cdinfo_wwwwarp_parmload() is called (where it segfaults). This patch seems to fix it for me, but the author should take a look at it. Perhaps we're doing something else wrong... -- Dan Eischen [ add the patch to ports/audio/xmcd/patch-ai ] --- cda_d/cda.c.orig Sun Apr 18 12:02:09 2004 +++ cda_d/cda.c Sun Apr 18 12:02:39 2004 @@ -7716,9 +7716,6 @@ (void) sprintf(path, USR_CMCFG_PATH, hd); di_common_parmload(path, FALSE, FALSE); - /* Set up basic wwwWarp structure */ - cdinfo_wwwwarp_parmload(); - if (app_data.device != NULL && (int) strlen(app_data.device) >= FILE_PATH_SZ) CDA_FATAL(app_data.str_longpatherr); @@ -7757,6 +7754,9 @@ cdinfo_cldata.fatal_msg = cda_fatal_msg; cdinfo_cldata.warning_msg = cda_warning_msg; cdinfo_init(&cdinfo_cldata); + + /* Set up basic wwwWarp structure */ + cdinfo_wwwwarp_parmload(); #ifndef NOVISUAL if (visual) {