Exception in vtkSMPTols.h
In running tests for vtk-examples, some examples are showing in Windows MSVC:
Unhandled exception at 0x00007FFE949EF84D (vtkCommonDataModel-9.0d.dll) in XMLPUnstructuredGridWriter.exe: Stack cookie instrumentation code detected a stack-based buffer overrun.
In Linux I am getting a stack smashing detected error.
This is happening at line 247 of vtkSPMPTools.h
template <typename Functor>
static void For(vtkIdType first, vtkIdType last, vtkIdType grain, Functor& f)
{
typename vtk::detail::smp::vtkSMPTools_Lookup_For<Functor>::type fi(f);
fi.For(first, last, grain);
}
In the case of the IO tests when running the vtk-example tests, these are the ones that fail:
376:IO-WriteVTU
385:IO-WriteXMLLinearCells
387:IO-XMLPUnstructuredGridWriter
WriteVTU: first = 0, last = 1, grain = 0
WriteXMLLinearCells: first = 0, last = 1, grain = 0
XMLPUnstructuredGridWriter: first = 0, last = 38, grain = 0
Other examples are also failing, with the same message.
The code is quite simple for these examples e.g. WriteVTU