From owner-freebsd-current@FreeBSD.ORG Wed May 28 08:36:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C30E37B401 for ; Wed, 28 May 2003 08:36:56 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9F0A43FA3 for ; Wed, 28 May 2003 08:36:54 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id BAA10949; Thu, 29 May 2003 01:36:31 +1000 Date: Thu, 29 May 2003 01:36:29 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Terry Lambert In-Reply-To: <3ED3804B.DC65E10A@mindspring.com> Message-ID: <20030529011400.A1228@gamplex.bde.org> References: <200305201025.30296.jlido@goof.com> <20030522093623.30915ed0.fearow@attbi.com> <20030527200208.L1802@gamplex.bde.org> <3ED3804B.DC65E10A@mindspring.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: gcc/libm floating-point bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2003 15:36:56 -0000 On Tue, 27 May 2003, Terry Lambert wrote: > BTW: signal stacks are irrelevent; technically, you are not > allowed to do floating point in signal handlers anyway. 8-). Not true. Signal handlers can do almost anything with local variables. The main relevant restrictions on them is that they must not access any static or global variables (other than write-only accesses to objects whose type is volatile sig_atomic_t) or call any functions that might make such accesses (which rules out calling most functions including everything in libm). These restrictions (and bugs) just make doing floating in signal handlers not very useful. Doing significant floating point calculations in signal handlers might involve duplicating functions from libm inline or as signal-safe private functions. Outputting the results or otherwise influencing the world might involve converting the results to arrays of bits and assigning the bits to sig_atomic_t objects for later interpretation. Bruce