Skip to content

Fix issues with UnitTestVectorAnalysis for MSVC.

We have been having a problem with one of the MSVC dashboards failing the UnitTestVectorAnalysis test. The test just dies in the middle with no indication of what problematic thing was run.

After playing with this for quite a while, I found that it could by triggered exclusively in the Lerp test. I further found that if I switched the order of the test and check Lerp the test worked. This is strange behavior and leads me to believe one of the following is going on:

  1. There is an error such as an invalid memory access happening in the VTK-m code that is sometimes corrupting the stack.
  2. Somewhere there is an expression that has undefined behavior. Usually it works OK, but some optimization sequence causes it to fail.
  3. There is a bug in one of the compiler's optimizations.

It concerns me that I cannot identify exactly where the problem lies. I've looked very hard at the vtkm::Vec and vtkm::Lerp code to try to find possible problems, but I have not been able to find anything.

Merge request reports