Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2001 00:54:58 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Thomas Zenker <thz@lennartz-electronic.de>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: SIGSEGV can be blocked!?
Message-ID:  <20010109005458.N15744@fw.wintelcom.net>
In-Reply-To: <20010109090032.A795@mezcal.tue.le>; from thz@lennartz-electronic.de on Tue, Jan 09, 2001 at 09:00:32AM %2B0100
References:  <20010108161854.A3547@mezcal.tue.le> <200101082132.f08LWhL18526@saturn.home.ben.com> <20010109090032.A795@mezcal.tue.le>

next in thread | previous in thread | raw e-mail | index | archive | help
* Thomas Zenker <thz@lennartz-electronic.de> [010109 00:19] wrote:
> On Mon, Jan 08, 2001 at 01:32:43PM -0800, Ben Jackson wrote:
> > > Blocking SIGSEGV with sigprocmask does really BLOCK it. 
> > > I think, this is a bug. I discovered this because I wanted to
> > > provoke a core dump by a write to (int *)0, but the process got hung,
> > 
> > The instruction that caused the SEGV is going to restart after any handler
> > runs because the handler may have mapped the page that caused the fault.
> > 
> > On other operating systems you can block SEGV for purposes of asynchronous
> > signals (ie `kill -SEGV') but not for synchronous signals.  To quote from
> > the Solaris sigprocmask manpage:
> > 
> >      Signals that  are  generated  synchronously  should  not  be
> >      masked.  If  such  a  signal  is  blocked and delivered, the
> >      receiving process is killed.
> > 
> > and indeed a test program shows that you still get SEGV in that case.
> > You can still shoot yourself in the foot with a SEGV handler that doesn't
> > eliminate the fault.
> 
> there is no handler for SEGV - it is simply blocked, if QUIT have been
> blocked the machine would lockup.

Sorry, what?  The machine should never lockup because of signal handling.

Can you clarify?

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010109005458.N15744>