NetBSD Problem Report #8987

Received: (qmail 16052 invoked from network); 13 Dec 1999 12:07:23 -0000
Message-Id: <199912131207.NAA18275@macppc.ina.fr>
Date: Mon, 13 Dec 1999 13:07:02 +0100 (CET)
From: gaillard@ina.fr
Reply-To: gaillard@ina.fr
To: gnats-bugs@gnats.netbsd.org
Subject: /sbin/dump core dump on netbsd-macppc1.4.1
X-Send-Pr-Version: 3.95

>Number:         8987
>Category:       port-macppc
>Synopsis:       /sbin/dump core dump on netbsd-macppc1.4.1
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-macppc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 13 04:09:00 +0000 1999
>Closed-Date:    Wed Mar 15 11:49:48 +0000 2000
>Last-Modified:  Wed Mar 15 11:53:00 +0000 2000
>Originator:     Fabrice Gaillard
>Release:        NetBSD 1.4.1
>Organization:
INA
>Environment:
powermac 7600
System: NetBSD macppc 1.4.1 NetBSD 1.4.1 (MACPPC) #0: Fri Sep 17 18:57:39 CEST 1999 root@macppc:/usr/src/sys/arch/macppc/compile/MACPPC macppc


>Description:

macppc# dump -0S /
  DUMP: Date of this level 0 dump: Mon Dec 13 12:50:03 1999
  DUMP: SIGSEGV: ABORTING!
Segmentation fault

I upgraded /sbin/dump to curent, the problem remain
compiled with
 CPPFLAGS+= -DDEBUG -DTDEBUG -DFDEBUG -DWRITEDEBUG -DSTATS -DDIAGNOSTICS

macppc# /sbin/dump -0S /
  DUMP: pid=18103 Looking for name /dev/rsd0a in dumpdates = /etc/dumpdates for level = 0
  DUMP: pid=18103 SIGSEGV: ABORTING!
Segmentation fault

As gdb is not available on that platform, I cannot investigate further

>How-To-Repeat:

	dump -0S /

>Fix:

	unknown

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->port-macppc-maintainer 
Responsible-Changed-By: fair 
Responsible-Changed-When: Sat Dec 18 11:29:55 PST 1999 
Responsible-Changed-Why:  
Malformatted PR manually reformatted and assigned to the appropriate category. 
Please DO NOT remove the ">" characters from the PR fields when editing a PR 
for submission; GNATS uses those as part of the field identifier. 

From: Fabrice Gaillard <gaillard@ina.fr>
To: gnats-bugs@netbsd.org
Cc:  Subject: port-macppc/8987
Date: Wed, 16 Feb 2000 18:21:01 +0100

 I'v found a dirty fix for the problem : 


 in file optr.c and function msg(const char *fmt, ...)

 comment the line :

         (void) vsnprintf(lastmsg, sizeof lastmsg, fmt, ap);


 No more SIGSEGV !!!

 Is there a bug in the vsnprintf function ????

From: Tsubai Masanari <tsubai@iri.co.jp>
To: Fabrice Gaillard <gaillard@ina.fr>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-macppc/8987
Date: Sun, 5 Mar 2000 22:52:07 +0900 (JST)

 Hi,

 I've rewritten stdarg/varargs on powerpc.  As a side effect:-),
 /sbin/dump should work now.  Please check.

 (replace /usr/include/powerpc/{ansi.h,stdarg.h,varargs.h} from
 the latest -current (in sys/arch/powerpc/include), and recompile
 /sbin/dump.)


 For the record:

 /sbin/dump crashed because it used "ap" twice.  In optr.c:msg(),

 #if __STDC__
 	va_start(ap, fmt);
 #else
 	va_start(ap);
 #endif
 	(void) vfprintf(stderr, fmt, ap);
 	(void) fflush(stdout);
 	(void) fflush(stderr);
 	(void) vsnprintf(lastmsg, sizeof lastmsg, fmt, ap);
 	va_end(ap);

 since va_list was an array of one element on powerpc, the vfprintf
 call used ap and changed it, then modified ap was passwd to vsnprintf
 and crashed because of no args left.

State-Changed-From-To: open->feedback 
State-Changed-By: tsubai 
State-Changed-When: Fri Mar 10 03:43:48 PST 2000 
State-Changed-Why:  
Fixed, waiting for the acknowledge. 
State-Changed-From-To: feedback->closed 
State-Changed-By: tsubai 
State-Changed-When: Wed Mar 15 03:49:48 PST 2000 
State-Changed-Why:  
Acknowledged. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.