From waynec@spinnaker.com  Mon Oct 29 20:33:01 2007
Return-Path: <waynec@spinnaker.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A260216A475;
	Mon, 29 Oct 2007 20:33:01 +0000 (UTC)
	(envelope-from waynec@spinnaker.com)
Received: from schooner.spinnaker.com (schooner.spinnaker.com [199.175.163.1])
	by mx1.freebsd.org (Postfix) with ESMTP id 9394C13C4A7;
	Mon, 29 Oct 2007 20:32:59 +0000 (UTC)
	(envelope-from waynec@spinnaker.com)
Received: from schooner.spinnaker.com (localhost.spinnaker.com [127.0.0.1])
	by schooner.spinnaker.com (8.13.8/8.13.8) with ESMTP id l9T8Z7ZU068403;
	Mon, 29 Oct 2007 01:35:07 -0700 (PDT)
	(envelope-from waynec@schooner.spinnaker.com)
Received: (from waynec@localhost)
	by schooner.spinnaker.com (8.13.8/8.13.8/Submit) id l9T8Z7Ye068402;
	Mon, 29 Oct 2007 01:35:07 -0700 (PDT)
	(envelope-from waynec)
Message-Id: <200710290835.l9T8Z7Ye068402@schooner.spinnaker.com>
Date: Mon, 29 Oct 2007 01:35:07 -0700 (PDT)
From: Wayne Chapeskie <waynec@spinnaker.com>
Reply-To: Wayne Chapeskie <waynec@spinnaker.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: "Release Engineers" <re@freebsd.org>
Subject: sysinstall segfault in FreeBSD 7.0-BETA1.5 on "AMD" toggle
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         117642
>Category:       bin
>Synopsis:       sysinstall segfault in FreeBSD 7.0-BETA1.5 on "AMD" toggle
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kensmith
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 29 20:40:02 UTC 2007
>Closed-Date:    Sat Nov 17 22:02:01 UTC 2007
>Last-Modified:  Sat Nov 17 22:02:01 UTC 2007
>Originator:     Wayne Chapeskie
>Release:        FreeBSD 7.0-BETA1.5 i386
>Organization:
Spinnaker Systems
>Environment:
System: FreeBSD mises.spinnaker.com 7.0-BETA1.5 FreeBSD 7.0-BETA1.5 #0: Thu Oct 25 01:19:36 UTC 2007 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	
	/usr/sbin/sysinstall segfaults with Signal 11, in the
	Configure/Networking menu, if you attempt to toggle the "AMD"
	entry.  Happens both from an install from CD, and when running
	sysinstall from an installed system.  None of the other
	entries on this menu cause a fault; and the segfault occurs
	even if the item is already selected (rc.conf already has the
	appropriate entry).
>How-To-Repeat:
	
	Run sysinstall, select the "Configure" menu; then select the
	"Networking" menu; move to the "AMD" entry, press space to
	toggle it.
>Fix:

	


>Release-Note:
>Audit-Trail:

From: Yuri Pankov <yuri.pankov@gmail.com>
To: Wayne Chapeskie <waynec@spinnaker.com>
Cc: bug-followup@freebsd.org
Subject: Re: bin/117642: sysinstall segfault in FreeBSD 7.0-BETA1.5 on
	"AMD" toggle
Date: Tue, 30 Oct 2007 08:12:02 +0300

 --=-4CM9KAqISZeL7Wat7C9V
 Content-Type: text/plain
 Content-Transfer-Encoding: 7bit
 
 Confirmed on -CURRENT with one addition - it segfaults whenever
 configRpcBind is called (Networking-AMD, Networking-rpc.statd,
 Networking-rpc.lockd, Startup-NIS client, Startup-NIS server). Value,
 returned by variable_get, isn't checked. Can be solved with attached
 patch.
 
 
 --=-4CM9KAqISZeL7Wat7C9V
 Content-Disposition: attachment; filename=config.c.diff
 Content-Type: text/x-patch; name=config.c.diff; charset=UTF-8
 Content-Transfer-Encoding: base64
 
 LS0tIHNyYy91c3Iuc2Jpbi9zeXNpbnN0YWxsL2NvbmZpZy5jLm9yaWcJMjAwNy0xMC0zMCAwNzo1
 NDozMS4wMDAwMDAwMDAgKzAzMDANCisrKyBzcmMvdXNyLnNiaW4vc3lzaW5zdGFsbC9jb25maWcu
 YwkyMDA3LTEwLTMwIDA4OjA0OjA2LjAwMDAwMDAwMCArMDMwMA0KQEAgLTg3MywxMCArODczLDEy
 IEBADQogew0KICAgICBpbnQgcmV0dmFsID0gMDsNCiAgICAgaW50IGRvdXBkYXRlID0gMTsNCisg
 ICAgY2hhciAqdmFyOw0KIA0KICAgICBpZiAoc2VsZiAhPSBOVUxMKSB7DQogICAgIAlyZXR2YWwg
 PSBkbWVudVRvZ2dsZVZhcmlhYmxlKHNlbGYpOw0KLQlpZiAoc3RyY21wKHZhcmlhYmxlX2dldChz
 ZWxmLT5kYXRhKSwgIllFUyIpICE9IDApDQorCXZhciA9IHZhcmlhYmxlX2dldChzZWxmLT5kYXRh
 KTsNCisJaWYgKHZhciAmJiBzdHJjbXAodmFyLCAiWUVTIikgIT0gMCkNCiAJICAgIGRvdXBkYXRl
 ID0gMDsNCiAgICAgfQ0KIA0K
 
 
 --=-4CM9KAqISZeL7Wat7C9V--
State-Changed-From-To: open->patched 
State-Changed-By: linimon 
State-Changed-When: Tue Oct 30 08:18:13 UTC 2007 
State-Changed-Why:  
From misfiled PR bin/117657: 

Date: Tue, 30 Oct 2007 01:04:11 -0400 
From: Ken Smith <kensmith@cse.Buffalo.EDU> 

Thanks for the report.  I patched it in HEAD and will try to get it 
MFCed for BETA2. 


Responsible-Changed-From-To: freebsd-bugs->kensmith 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Oct 30 08:18:13 UTC 2007 
Responsible-Changed-Why:  

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/117642: commit references a PR
Date: Tue, 30 Oct 2007 13:04:09 +0000 (UTC)

 kensmith    2007-10-30 05:03:38 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.sbin/sysinstall  config.c dmenu.c 
   Log:
   Selecting amd and a few other things in the Networking config section
   caused a segfault.  It turns out that in pre-7.0 systems if you do
   getenv("amd_enable=YES") it will return the setting of the environment
   variable "amd_enable" but now it returns NULL.  I think I found the
   places where sysinstall was potentially relying on that old behavior.
   Fix is to make a copy of the string to be used for the getenv(3) call,
   look for a '=' character in it, and replace it with '\0' if one is
   found.  Stuck to sysinstall's typical coding standards despite urges
   to do otherwise.
   
   PR:             117642
   MFC after:      2 days
   
   Revision  Changes    Path
   1.243     +6 -1      src/usr.sbin/sysinstall/config.c
   1.48      +8 -4      src/usr.sbin/sysinstall/dmenu.c
 _______________________________________________
 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"
 
State-Changed-From-To: patched->closed 
State-Changed-By: kensmith 
State-Changed-When: Sat Nov 17 22:01:16 UTC 2007 
State-Changed-Why:  

Patch seems to be working... :-) 


http://www.freebsd.org/cgi/query-pr.cgi?pr=117642 
>Unformatted:
