Skip to content

BUG: Enabled floating point exceptions for tests

Bill Lorensen requested to merge lorensen/vtk:lorensen/vtk-DivideByZero_1 into master

The dynamic analysis tests have uncovered a number of floating point exceptions, mainly divide by zero. This MR enables floating point exceptions if tests are built with a debug build type and the compiler is a gnu compiler.

Safety guards have been added to classes that exhibited exceptions.

TestAdjustLowerBoundForLogPlot.cxx - Tried to take log10 of negative number

TestlinePlotDouble - inf and nan used in test. Disable exceptions

vtkChart.cxx - guards to protect against zero divide

vtkChartBox.cxx - guards to protect against zero divide

vtkInteractiveArea.cxx - trying to take log10 of negative number

vtkPiecewisePointHandleItem.cxx - protect against degenerate lines

vtkAMRSliceFilter.cxx - protect against zero length vector

vtkLagrangianBasicIntegrationModel.cxx - guards to protect against zero divide

UnitTestMultiThreshold - disable exceptions for one test that uses Nan()

vtkIntersectionPolyDataFilter.cxx - guard acos range

vtkPCAStatistics.cxx - guards to protect against zero divide

vtkCubeAxesActor.cxx - guard against log10(0.0)

vtkColorTransferFunction.cxx - guard to protect against zero divide

TestGPURayCastIsosurface.cxx - disable exceptions, possible driver issue

vtkDendrogramItem.cxx - check for degenrate line

vtkDendrogramItem.h - comparison doesn't meet irreflexive requirements 252cad22

Edited by Bill Lorensen

Merge request reports