Subject: sparc: sh dumps core
To: None <christos@NetBSD.ORG>
From: Juergen Hannken-Illjes <hannken@serv1.eis.cs.tu-bs.de>
List: port-sparc
Date: 10/15/1997 16:03:08
On Tue, 14 Oct 1997 11:01:31, I wrote:

> 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'.

Christos's change to bin/sh/jobs.c (1.23 1997/10/08 20:31:52) breaks on sparc.

He changed line 782 from

	else if ((sp->status & 0377) == 0177)

to

	else if (WIFSTOPPED(sp->status))

expanding to

	else if ((((*(int *)&(   sp->status   ))  & 0177)  == 0177 ) )

where `short status' is treated as an `* (int *)'.

What should be fixed, `WIFSTOPPED' or the `status' type?

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