Re: gcc/libm floating-point bug?

From: John Polstra <jdp_at_polstra.com>
Date: Wed, 28 May 2003 09:16:21 -0700 (PDT)
In article <20030529011400.A1228_at_gamplex.bde.org>,
Bruce Evans  <bde_at_zeta.org.au> wrote:
> 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).

Those are the rules set forth by the C standard, but POSIX.1 demands
much more from the implementation.  There's a whole list of functions
that POSIX says must be safely callable from signal handlers.  Almost
all of the I/O calls are included.  Even fork and exec[lv]e must be
callable from signal handlers.

John
-- 
  John Polstra
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Two buttocks cannot avoid friction."                     -- Malawi saying
Received on Wed May 28 2003 - 07:16:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:09 UTC