Date: Thu, 29 May 2003 01:36:29 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Terry Lambert <tlambert2@mindspring.com> Cc: freebsd-current@freebsd.org Subject: Re: gcc/libm floating-point bug? Message-ID: <20030529011400.A1228@gamplex.bde.org> In-Reply-To: <3ED3804B.DC65E10A@mindspring.com> References: <200305201025.30296.jlido@goof.com> <20030522093623.30915ed0.fearow@attbi.com> <20030527200208.L1802@gamplex.bde.org> <3ED3804B.DC65E10A@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030529011400.A1228>