[Insight-developers] Fix for Floating Point Exception Handling Redding Up Dashboard

Williams, Norman K norman-k-williams at uiowa.edu
Fri Apr 15 12:34:40 EDT 2011


I pushed a new version of the patch for Floating Point Exception Handling
that does a few things:

1. Turns OFF FPE handling during regression testing EXCEPT on Linux, as
per Luis' suggestion. As observed, Release builds on OSX throw all sorts
of exceptions and make people see red.

2. Don't run the tests for itk::FloatingPointsExceptions except on Linux,
as per Luis suggestion.

3. Implement a version of feenablexcept/disablexcept for Solaris, based on
research in the Solaris man pages.

This has taken up more time than I would really like it to; but it is a
thorny topic without a clearcut solution.  I've added comments pointing to
where the rationale for the code comes from to
itkFloatingPointExceptions.cxx.

The real problem comes down to the question of feenableexcept and
fedisablexcept, which are ONLY implemented in the Gnu C library.  Those
two functions were added to the Gnu library because of a shortcoming in
the C99 Standard fenv.h functions: They don't allow you to enable or
disable individual exceptions.

I thought I could make this code simpler, using just the C99 Fenv stuff on
all platforms, but it doesn't seem like
that is the case.  If anyone can see a good way to do this based on this:

http://pubs.opengroup.org/onlinepubs/000095399/basedefs/fenv.h.html


--
Kent Williams norman-k-williams at uiowa.edu






________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list