<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">After some more tests, it looks like the errors only appear when I use the -analyze-headers option. Some of the classes I am using are templated and have implementation in the header files so I assumed I would need to use that feature to test that code. What exactly does -analyze-headers do and why would that generate those errors? If this still appear to be some sort of bug I will file a report with an example preprocessed file but I don't want to pollute the bug list if this is not a real issue.<br><br>Thanks,<br>Ford<br><br><br><br><font color="#990099">-----Jordan Rose <jordan_rose@apple.com> wrote: -----</font><div style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: William SleemanIV <wsleemaniv@mcvh-vcu.edu><br>From: Jordan Rose <jordan_rose@apple.com><br>Date: 12/03/2013 08:34PM<br>Cc: cfe-users@cs.uiuc.edu<br>Subject: Re: [cfe-users] clang crashing<br><br><div>The analyzer should definitely support exceptions and std::exception, though it mostly does so by throwing up its hands rather than trying to follow the exception path. It definitely should not crash. Can you file a bug at <a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and attach a preprocessed version of the failing file? (Or a standalone test case.)</div><div><br></div><div>Sorry you're having trouble,</div><div>Jordan</div><div><br></div><br><div><div>On Nov 22, 2013, at 9:34, William SleemanIV <<a href="mailto:wsleemaniv@mcvh-vcu.edu">wsleemaniv@mcvh-vcu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><font size="2" face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif">I am using Ubuntu 13.10 and build clang/LLVM as described here: <a href="http://clang.llvm.org/get_started.html">http://clang.llvm.org/get_started.html</a>. When using scan-build I get a lot of crash reports with output like this:<br><br>libtool: compile:  /home/fsleeman/Downloads/clang/llvm/tools/clang/tools/scan-build/c++-analyzer -DHAVE_CONFIG_H -I. -I.. -I../dal/include -I../include -I../util/include -I../dil/include -I../filter/include -g -m64 -MT rcfBitmapImageContainer.lo -MD -MP -MF .deps/rcfBitmapImageContainer.Tpo -c ../dal/src/rcfBitmapImageContainer.cpp  -fPIC -DPIC -o .libs/rcfBitmapImageContainer.o<br>0  clang++         0x000000000314c616 llvm::sys::PrintStackTrace(_IO_FILE*) + 38<br>1  clang++         0x000000000314c893<br>2  clang++         0x000000000314c2e9<br>3  libpthread.so.0 0x00002b870d623bb0<br>4  clang++         0x0000000000d14d18<br>5  clang++         0x0000000001f33a9c clang::Stmt::getLocStart() const + 24<br>6  clang++         0x0000000001861f70<br>7  clang++         0x00000000018623dc clang::ento::PathDiagnosticLocation::createBegin(clang::Stmt const*, clang::SourceManager const&, llvm::PointerUnion<clang::LocationContext const*, clang::AnalysisDeclContext*>) + 48<br>8  clang++         0x000000000177db22<br>9  clang++         0x000000000177df67<br>10 clang++         0x00000000017ff469<br>11 clang++         0x00000000017facc7 clang::ento::CheckerManager::runCheckersForEndAnalysis(clang::ento::ExplodedGraph&, clang::ento::BugReporter&, clang::ento::ExprEngine&) + 99<br>12 clang++         0x0000000001822aea clang::ento::ExprEngine::processEndWorklist(bool) + 72<br>13 clang++         0x000000000181276d clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 935<br>14 clang++         0x00000000016321ee<br>15 clang++         0x000000000160add4<br>16 clang++         0x000000000160aef4<br>17 clang++         0x000000000160abca<br>18 clang++         0x000000000160a2ef<br>19 clang++         0x000000000160a635<br>20 clang++         0x00000000010dab1e clang::ParseAST(clang::Sema&, bool, bool) + 780<br>21 clang++         0x0000000000c94f6a clang::ASTFrontendAction::ExecuteAction() + 322<br>22 clang++         0x0000000000c94aad clang::FrontendAction::Execute() + 205<br>23 clang++         0x0000000000c67c1a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 720<br>24 clang++         0x0000000000c3732a clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1026<br>25 clang++         0x0000000000c2886f cc1_main(char const**, char const**, char const*, void*) + 717<br>26 clang++         0x0000000000c32bc3 main + 785<br>27 libc.so.6       0x00002b870e274de5 __libc_start_main + 245<br>28 clang++         0x0000000000c27f79<br>Stack dump:<br>0.    Program arguments: /usr/local/bin/clang++ -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -main-file-name rcfBitmapImageContainer.cpp -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.23.52.20130913 -resource-dir /usr/local/bin/../lib/clang/3.5 -D HAVE_CONFIG_H -D PIC -I . -I .. -I ../dal/include -I ../include -I ../util/include -I ../dil/include -I ../filter/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8 -internal-isystem /usr/local/include -internal-isystem /usr/local/bin/../lib/clang/3.5/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /rdoppg/dvfTmp/fsleeman/clangTests/rcf2013/lib -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-slp -analyzer-opt-analyze-headers -analyzer-checker=debug.Stats -analyzer-output=html -o /home/fsleeman/rcf2013/results/2013-11-22-111838-11071-1 -x c++ ../dal/src/rcfBitmapImageContainer.cpp <br>1.    <eof> parser at end of file<br><br>Clang does give reasonable results for a small subset of source files I am trying analyze. The common link between files that crash and ones that do not is exceptions. Does clang support std::exception and do I need to enable/disable some exception feature when compiling the code?<br><br><div>NOTE:  The information contained in this message may be privileged and confidential and protected from disclosure.  If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.<br>--------------------------------------<br>VCU Health System<br><a href="http://www.vcuhealth.org">http://www.vcuhealth.org</a></div></font> _______________________________________________<br>cfe-users mailing list<br><a href="mailto:cfe-users@cs.uiuc.edu">cfe-users@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users<br></blockquote></div><br></div></div><div>NOTE:  The information contained in this message may be privileged and confidential and protected from disclosure.  If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.<br>--------------------------------------<br>VCU Health System<br>http://www.vcuhealth.org</div></font>