[vtk-developers] VTK test failures in release mode
Francois Bertel
francois.bertel at kitware.com
Wed Jul 4 12:11:51 EDT 2007
I'll do it. Thanks for the patch.
Mathieu Coursolle wrote:
> Hi VTK developpers,
>
> We currently have a private dashboard building VTK on a beta version of
> Mac OSX 10.5.
>
> The following tests are failing in Release mode only:
> - TestGenericDataSetTesselator
> - TestGenericContourFilter
> - TestGenericClip
> - TestGenericCutter
>
> The problem seems to come from the Tessellate function of
> vtkSimpleCellTessellator.cxx.
>
> Two local variables (edgeIds and faceIds) are declared on the stack as
> int buffers. Then,
> two member pointers of vtkTetraTile are initialized with the addresses
> of the previous stack
> variables.
>
> However, those pointers are later used when the local variables get out
> of scope (if (complexCell)/else),
> leaving the pointers of vtkTetraTile to some invalid data.
>
> It does not seem to cause any problem to most of the public dashboard,
> but seems dangerous to do so.
> I attached a patch to solve the problem. I just declared the variables
> outside of the if/else so that
> they do not get out of scope before being used. I ran the tests without
> any failures.
>
> Also, I saw that some optimization flag was removed before the Refine
> function is called for
> Visual studio 7. A quick guess may suggest that the optimization flag
> was reveling the problem.
> Maybe one could try to run the code without that #pragma
> optimize("g",off) call to see if the provided
> patch fixes the problem.
>
> If you agree, could either someone commit this patch, or grant me commit
> access ;)
> Should I file a bug for that?
>
> Thank you!
>
> Mathieu
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
--
François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
More information about the vtk-developers
mailing list