Subject: Re: "panic: trap" while trying to run linux/i386 netscape with
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 12/16/1998 07:09:24
In article <199812160122.CAA13491@animal.cs.chalmers.se> augustss@cs.chalmers.se (Lennart Augustsson) writes:
>
>As far as I can tell the linux emulation is broken.
>netscape dies in bsd_to_linux_wstat because *status
>is -1. A quick glance at the code seems to reveal
>that WSTOPSIG returns the upper 24 bits. The code
>does a shift that should have produced -1, but maybe
>there is an egcs codegen bug?
>
>Furthermore, the indexing in bsd_to_linux_wstat should,
>in my opinion, be guarded by some tests to make sure
>that 0 <= *status < NSIG.
>
>There is yet another bug (but harmless):
>in linux_sys_wait4 status is assigned a pointer that points
>to an object of size sizeof(int *) instead of size sizeof(int).
>
>That's all the bugs it could spot in 5 minutes.
>
Maybe we should also change <sys/wait.h> to mask the rest of the
bits that are not defined. This is what other OS's do.
christos