Re: [xml] strace reports SIGFPE during parsing



On Thu, Jul 12, 2001 at 05:54:09PM +0200, Petr Kozelka wrote:
when run with strace, it shows that SIGFPE occurs many times and 
is ignored (see log at the end of this message).
This is not a problem inside a normal C program, but Kylix seems 
to handle this signal in a way that terminates the application.

   Initialization of Nan +Infinity and -Infinity in xpath.c:

-----------------------
double
xmlXPathDivideBy(double f, double fzero) {
    double ret;
#ifdef HAVE_SIGNAL
#ifdef SIGFPE
#ifdef SIG_IGN
    void (*sighandler)(int);
    sighandler = signal(SIGFPE, SIG_IGN);
#endif
#endif
#endif
    ret = f / fzero;
#ifdef HAVE_SIGNAL
#ifdef SIGFPE
#ifdef SIG_IGN
    signal(SIGFPE, sighandler);
#endif
#endif
#endif
    return(ret);
}
-----------------------


   The signal handler should be saved and restaured. This may
be platform specific.

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Sep 17-18 2001 Brussels Red Hat TechWorld http://www.redhat-techworld.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]