[vtk-developers] VTK test failures in release mode

Mathieu Coursolle mcoursolle at rogue-research.com
Wed Jul 4 09:02:05 EDT 2007

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

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

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 Coursolle                   mcoursolle at rogue-research.com
Rogue Research                      www.rogue-research.com 
Montréal, Québec, Canada
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TessellatePatchFile.txt
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20070704/c6f2d4c4/attachment-0001.txt>

More information about the vtk-developers mailing list