From owner-freebsd-bugs Mon May 3 2:41: 7 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from cons.org (knight.cons.org [194.233.237.195]) by hub.freebsd.org (Postfix) with ESMTP id 2BE1C14BE6; Mon, 3 May 1999 02:41:02 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id LAA27292; Mon, 3 May 1999 11:40:43 +0200 (CEST) Date: Mon, 3 May 1999 11:40:40 +0200 From: Martin Cracauer To: Bruce Evans Cc: cracauer@cons.org, freebsd-bugs@FreeBSD.ORG, steve@FreeBSD.ORG Subject: Re: kern/2142: FP mask not saved for signal handlers Message-ID: <19990503114038.A24124@cons.org> References: <199905011743.DAA03750@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <199905011743.DAA03750@godzilla.zeta.org.au>; from Bruce Evans on Sun, May 02, 1999 at 03:43:03AM +1000 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In <199905011743.DAA03750@godzilla.zeta.org.au>, Bruce Evans wrote: > You are allowed to do silly things like: [...] > This does floating point computations in a signal handler and doesn't > have any side effects except the one permitted by ANSI (assigning a value > to an object declared as volatile_sig_atomic_t). The volatile doubles > just prevent some of the floating point computations being optimised away. > This shows that the FP state needs to be preserved by signal handlers. When I closed my bug report, I misread the ANSI standard. I thought you were not allowed to manipulate any variables that aren't volatile sig_atomic_t, where this applies only for variables visible outside the signal handler, thus FreeBSD is broken here. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message