From owner-freebsd-stable Tue Jan 9 4:39:39 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.tue.le (p3E9E12EB.dip.t-dialin.net [62.158.18.235]) by hub.freebsd.org (Postfix) with ESMTP id 6AB2A37B400 for ; Tue, 9 Jan 2001 04:39:18 -0800 (PST) Received: from mezcal.tue.le (mezcal.tue.le [192.168.201.20]) by mail.tue.le (8.8.8/8.8.8) with ESMTP id NAA27965 for ; Tue, 9 Jan 2001 13:38:30 +0100 (CET) (envelope-from thz@mezcal.tue.le) Received: (from thz@localhost) by mezcal.tue.le (8.11.1/8.11.1) id f09CcU503189 for freebsd-stable@freebsd.org; Tue, 9 Jan 2001 13:38:30 +0100 (CET) (envelope-from thz) Date: Tue, 9 Jan 2001 13:38:30 +0100 From: Thomas Zenker To: freebsd-stable@freebsd.org Subject: Re: SIGSEGV can be blocked!? Message-ID: <20010109133830.A3166@mezcal.tue.le> References: <20010108161854.A3547@mezcal.tue.le> <200101082132.f08LWhL18526@saturn.home.ben.com> <20010109090032.A795@mezcal.tue.le> <20010109005458.N15744@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20010109005458.N15744@fw.wintelcom.net>; from bright@wintelcom.net on Tue, Jan 09, 2001 at 12:54:58AM -0800 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 09, 2001 at 12:54:58AM -0800, Alfred Perlstein wrote: > * Thomas Zenker [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. > Yeah, normally it doesn't lockup, but it gives a full load on the machine. in my particular case it did lockup the machine, because it was running with the fifo scheduler at realtime prio. Anyway, obviously i have to unblock SEGV. the program was running before on other OSs like HPUX and Solaris. At least on HPUX i know, that SEGV was not possible to block. -- Thomas Zenker c/o Lennartz electronic GmbH Bismarckstrasse 136, D-72072 Tuebingen, Germany Phone: +49-(0)7071-93550 Email: thz@lennartz-electronic.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message