Re: [xml] strace reports SIGFPE during parsing
- From: Daniel Veillard <veillard redhat com>
- To: Petr Kozelka <pkozelka centrum cz>
- Cc: xml gnome org
- Subject: Re: [xml] strace reports SIGFPE during parsing
- Date: Thu, 12 Jul 2001 12:10:07 -0400
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]