gcc/libm floating-point bug?
    John Polstra 
    jdp at polstra.com
       
    Wed May 28 09:16:27 PDT 2003
    
    
  
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
    
    
More information about the freebsd-current
mailing list