Subject: bin/8154: ksh core dump on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: None <seebs@guild.plethora.net>
List: netbsd-bugs
Date: 08/06/1999 06:04:16
>Number:         8154
>Category:       bin
>Synopsis:       ksh can dump core on alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug  6 05:35:02 1999
>Last-Modified:
>Originator:     Seebs
>Organization:
>Release:        1999/08/06
>Environment:
System: NetBSD gandalf.plethora.net 1.4I NetBSD 1.4I (GANDALF) #0: Fri Aug 6 04:52:25 PDT 1999 seebs@gandalf.plethora.net:/usr/src/sys/arch/alpha/compile/GANDALF alpha


>Description:
	SYS=`uname -ms | sed -e 's![/ ]!_!g'`
	dumps core about half the time on my alpha.  Everything was compiled
	with '-mcpu=21164a -Wa,-m21164a', but I think this happened without
	that, too.

	set -x reports:
	+ uname -ms
	+ sed -e s![/ ]!_!g
	Memory fault (core dumped)
	+ SYS=

gdb sez:

#0  alloc (size=4895994880, ap=0x120187048) at alloc.c:101

list says:

96                              if (bp == NULL) {
97                                      aerror(ap, "cannot allocate");
98                                      return NULL;
99                              }
100                             if (ap->freelist == &aempty)
101                                     bp->next = bp;
102                             else {
103                                     bp->next = ap->freelist->next;
104                                     ap->freelist->next = bp;
105                             }

'bp' is $1 = (Block *) 0x123d2f400.

>How-To-Repeat:
	SYS=`uname -ms | sed -e 's![/ ]!_!g'`
	Repeat until bored.

>Fix:
>Audit-Trail:
>Unformatted: