[Insight-developers] Undefined Behavior and clang

Sean McBride sean at rogue-research.com
Tue Aug 2 10:51:42 EDT 2011


On Tue, 2 Aug 2011 10:25:56 -0400, Bradley Lowekamp said:

>I found the articles you linked to on the VXL dev list regarding 
>undefined behavior very interesting:

Indeed they are.  I have been enabling these flags to catch undefined behaviour on all my dashboards, starting with the smaller projects.  So far: it found no problems with CMake itself, but several for GDCM, vxl, and HDF5.

I'll get to it for ITK, but as you know today is the first day where it started compiling again!

>It appears that we have the clang compiler on you system now building
>ITK with out error!

Yay!  Thanks to all for fixing that.

>But there are a lot of failing tests. The cause of
>the error is related to our multi-threading approach. When I comment out
>the following line in itkImageSource, the test no longer seg-faults:
>
>  if ( threadId < total )
>    {
>    //str->Filter->ThreadedGenerateData(splitRegion, threadId);
>    }
>
>I was wondering if you have looked at these failures and if you had any
>insight into the clang compiler and why it would be causing these failures. 

My only insight is:
<http://llvm.org/bugs/show_bug.cgi?id=9395>
<http://llvm.org/bugs/show_bug.cgi?id=8098>

It's probably a clang bug, given this working elsewhere.  But maybe not...

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list