Subject: Re: 2nd review of fixes to sig_return() and LDT's
To: John Brezak <brezak@apollo.hp.com>
From: Chris G. Demetriou <cgd@nobozo.CS.Berkeley.EDU>
List: port-i386
Date: 01/07/1994 21:12:04
> > this shouldn't exist.  you shouldn't be mucking around with the
> > process's signal mask, nor should you be insisting that the signal
> > handler be the default one.
> Should this be called in sendsig() then. This is where I got the idea...

*huh*?  no, leave sendsig() alone.  use trapsignal() where you detect
the bogosity.  it's probably not "orthodox" to use trapsignal() here,
but i'd call this a detection of a "would have been fault" -- if
the data they provided would have caused the i[34]86 to fault, then
deliver the signal in the way that you would if it had.  See
.../i386/trap.c for a bit more info on what i mean.

> Even though it is most likely that a signal handler was the cause
> of the error ? So I would invoke it again in this case ?

umm:
	(1) if it was the SIGBUS signal handler that was the cause
		of the error, you won't be able to deliver a sigbus,
		because it will be blocked (because the signal mask
		shouldn't have been restored yet), unless the user
		re-enable SIGBUS catching.
	(2) if the user enabled catching of SIGBUSs from within
		their SIGBUS handler, then by all means, give
		them another (and perhaps another, and another, etc.,
		until the exceed their stack limit!)



chris

------------------------------------------------------------------------------