From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 21470 invoked from network); 12 May 1998 16:02:57 -0000 Received: from ellpspace.math.ualberta.ca (michal@129.128.88.19) by mail2.redhat.com with SMTP; 12 May 1998 16:02:57 -0000 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id KAA08633 for axp-list@redhat.com; Tue, 12 May 1998 10:02:52 -0600 From: Michal Jaegermann Message-Id: <199805121602.KAA08633@ellpspace.math.ualberta.ca> Subject: Re: How to trap floating point exceptions so mozilla doesn't crash? To: axp-list@redhat.com Date: Tue, 12 May 1998 10:02:52 -0600 (MDT) In-Reply-To: <355863D1.5537DAE9@altatech.com> from "Christian Worley" at May 12, 98 08:59:29 am Content-Type: text > > The big problem with mozilla seems to be floating point exceptions in > its java script interpreter. It seems to know how to handle them, but > in handling them mozilla crashes. I was recently battling exception problems for a friend who was pushing his Fortran beyond any limits of reason. :-) The solution is simple: 1st - apply patches by Richard Henderson to floating point handler in kernel (these patches should be included in in a long awaited 2.0.34 - AFAIK) 2nd - use libraries recompiled where needed with -mieee flag; in particular all stuff handling i/o conversions needed that or you trigger exceptions when writing your results 3rd - compile your programs with -mieee (or -mieee-with-inexact, or...) Points 2 and 3 will rob you of some performance but, OTOH, floating point exceptions vanished. For at least some programs point 1 was essential as well. Patches were posted on this list; at least the first set, maybe the second one on linux-kernel only? On a longer run it looks like that on Alpha we need two sets of libraries (one with -mieee and one without) and modified compiler specs file to pick-up a correct library sets depending on if one of -mieee-**** flags is used. For the time beeing a bit of hacking is required. > How, in AXP/Linux can I create a signal handler that will keep the > program from crashing on floating point exceptions? See above. Flags are described in gcc docs. It looks like java like to divide by zero, under/overflow floating point representation, etc. It is probably "this is for pictures only - we do not care". Michal