If there really is a problem here, it looks like it comes from the structure returned by a call to the &quot;readdir&quot; function which is implemented by the system libraries. So if there&#39;s a problem here, I don&#39;t think it&#39;s CMake&#39;s fault.<br>
<br><br><div class="gmail_quote">On Sat, Sep 22, 2012 at 9:57 PM, Sean McBride <span dir="ltr">&lt;<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
My dashboards used to build CMake with clang&#39;s -fcatch-undefined-behavior, but now they&#39;ve given it more smarts (to catch more bugs) and now one can&#39;t build CMake with this flag.<br>
<br>
Here&#39;s the build failure:<br>
<br>
&lt;<a href="http://open.cdash.org/viewBuildError.php?buildid=2562276" target="_blank">http://open.cdash.org/viewBuildError.php?buildid=2562276</a>&gt;<br>
<br>
It seems, near the end of the build, that the just-built cpack is run to do something or other.  This process dies:<br>
<br>
$ gdb --args ../bin/cpack --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.txt --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.html --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.1 --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.docbook<br>

<br>
(gdb) r<br>
Starting program: /Users/builder/external/CMake-clang-dbg-x86_64/bin/cpack --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.txt --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.html --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.1 --help-full /Users/builder/external/CMake-clang-dbg-x86_64/Docs/cpack.docbook<br>

Reading symbols for shared libraries ++++++............................................................ done<br>
<br>
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.<br>
0x0000000100fac2e9 in cmsys::Directory::Load (this=0x7fff5fbfba90, name=0x101f51c28 &quot;/Users/builder/external/CMake/Modules/&quot;) at /Users/builder/external/CMake/Source/kwsys/Directory.cxx:223<br>
223         this-&gt;Internal-&gt;Files.push_back(d-&gt;d_name);<br>
<br>
(gdb) bt<br>
#0  0x0000000100fac2e9 in cmsys::Directory::Load (this=0x7fff5fbfba90, name=0x101f51c28 &quot;/Users/builder/external/CMake/Modules/&quot;) at /Users/builder/external/CMake/Source/kwsys/Directory.cxx:223<br>
#1  0x0000000100fb158e in cmsys::Glob::ProcessDirectory (this=0x7fff5fbfc170, start=0, dir=@0x7fff5fbfbbf0) at /Users/builder/external/CMake/Source/kwsys/Glob.cxx:302<br>
#2  0x0000000100fb451a in cmsys::Glob::FindFiles (this=0x7fff5fbfc170, inexpr=@0x7fff5fbfc168) at /Users/builder/external/CMake/Source/kwsys/Glob.cxx:464<br>
#3  0x0000000100653545 in cmDocumentation::getDocumentedModulesListInDir (this=0x7fff5fbfe8f8, path=@0x7fff5fbfcab8, globExpr=@0x7fff5fbfcab0, docedModuleList=@0x7fff5fbfcae8) at /Users/builder/external/CMake/Source/cmDocumentation.cxx:771<br>

#4  0x000000010000fc9e in main (argc=9, argv=0x7fff5fbff920) at /Users/builder/external/CMake/Source/CPack/cpack.cxx:554<br>
<br>
(gdb) p name<br>
$1 = 0x101f51c28 &quot;/Users/builder/external/CMake/Modules/&quot;<br>
<br>
(gdb) p *this<br>
$2 = {<br>
  Internal = 0x101f51a80<br>
}<br>
<br>
(gdb) p d<br>
$3 = (struct dirent *) 0x102010664<br>
<br>
(gdb) p *d<br>
$4 = {<br>
  d_ino = 387485515,<br>
  d_seekoff = 1769662337112866820,<br>
  d_reclen = 48,<br>
  d_namlen = 20,<br>
  d_type = 8 &#39;\b&#39;,<br>
  d_name = &quot;<a href="http://AutomocInfo.cmake.in" target="_blank">AutomocInfo.cmake.in</a>\000\000\000\000\000\000\000?\032?\030\000\000\000\000\005\000\000\000?\032?\030D\000+\000\<a href="http://bBasicConfigVersion-AnyNewerVersion.cmake.in" target="_blank">bBasicConfigVersion-AnyNewerVersion.cmake.in</a>\000\000\000\000?\032?\030\000\000\000\000\006\000\000\000?\032?\030D\000(\000\<a href="http://bBasicConfigVersion-ExactVersion.cmake.in" target="_blank">bBasicConfigVersion-ExactVersion.cmake.in</a>\000\000\000\000\000\000\000?\032?\030\000\000\000\000\a\000\000\000???\032H\000,\000\bBasicConfigVersi&quot;...<br>

}<br>
<br>
It might be a false positive, though I have yet to see any from this tool.<br>
<br>
I&#39;m hoping someone that knows the code can see the problem.<br>
<br>
Cheers,<br>
<br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer              Montréal, Québec, Canada<br>
<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>