Subject: Obscure "signal 10, Bus error"
To: None <port-sparc@NetBSD.ORG>
From: Juergen Hannken-Illjes <hannken@serv1.eis.cs.tu-bs.de>
List: port-sparc
Date: 10/14/1997 11:01:31
Just got the sources from Sunday morning compiled and now I get obscure
core dumps.

I replaced the current `crt0.c' by the last version because `ld' always dumped
core on it.

Now `/bin/sh' does the same while running `make install'. I got the following
data from gdb:

| gdb ../sh/obj.sparc/sh sh.core
| GDB is free software and you are welcome to distribute copies of it
|  under certain conditions; type "show copying" to see the conditions.
| There is absolutely no warranty for GDB; type "show warranty" for details.
| GDB 4.11 (sparc-netbsd), Copyright 1993 Free Software Foundation, Inc...
| Core was generated by `sh'.
| Program terminated with signal 10, Bus error.
| #0  0xbeb8 in dowait (block=1, job=0x5f000) at /usr/src/bin/sh/jobs.c:780
| 
| 780                                     if (sp->status == -1)
| 
| (gdb) print *sp
| $1 = {pid = 22577, status = 0, cmd = 0x5c384 ""}
| 
| (gdb) x/i 0xbeb0
| 0xbeb0 <dowait+216>:    cmp  %o0, -1
| 0xbeb4 <dowait+220>:    bne,a   0xbec4 <dowait+236>
| 0xbeb8 <dowait+224>:    ld  [ %o2 + 2 ], %o0
| 0xbebc <dowait+228>:    b  0xbed4 <dowait+252>
| 
| gdb) print sp
| $2 = (struct procstat *) 0x5f000
| 
| (gdb) print /x $o2
| $3 = 0x5f000

Machine is a `sun4m TurboSparc'. If I remember right the `ld' problem with
`crt0.o' looked similar.

Suggestions?

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)