*BSD News Article 8655


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!metro!ipso!runxtsa!bde
From: bde@runx.oz.au (Bruce Evans)
Subject: Re: [386bsd]  How To Nuke 386bsd!!!
Message-ID: <1992Dec8.162737.19657@runx.oz.au>
Organization: RUNX Un*x Timeshare.  Sydney, Australia.
References: <ByntK9.1D6@news.chalmers.se> <1992Dec7.000113.20304@mel.dit.csiro.au>
Date: Tue, 8 Dec 92 16:27:37 GMT
Lines: 29

In article <1992Dec7.000113.20304@mel.dit.csiro.au> tim@catt.citri.edu.au writes:
>In article 1D6@news.chalmers.se, dana@me.chalmers.se (Dan Andersson) writes:

>>...
>>I happened to mistype some zeroes in 'limit datasize 5000000' in tcshell.
>>
>>It was an immediate kill... The system rebooted instantly.
>>...
>This doesn't happen on my system.  It seems to just stay at 32768K.

I think it's a floating point bug.  In csh, the limit is calculated as

	(int) (5000000.5 * 1024)

and the conversion to int causes a pending floating point exception.  Due
to various bugs, the exception gets reported in the kernel instead of in
csh.  The kernel does not expect itself to cause floating point exceptions
exceptions so it panics.

The easiest part of the fix is to add an `fwait' before the `ret' in
fixdfsi.s.  This causes the exception to be reported in user code (except
when there is a context switch just before the fwait - then the exception
is reported in the context switching code).

My kernel fixes involve ignoring FP exceptions during the context switch
and in other places.  There are secondary bugs with the context switch
losing the FP-exception-pending state.
-- 
Bruce Evans  (bde@runx.oz.au)