[LLVMbugs] [Bug 8426] New: 'clang --analyze' crashes when using incomplete type in templates

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 20 16:17:53 PDT 2010


           Summary: 'clang --analyze' crashes when using incomplete type
                    in templates
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: zhanyong.wan at gmail.com
                CC: llvmbugs at cs.uiuc.edu

$ cat test.cc
template <class T> class Foo {
  struct Bar;
  Bar* bar_;

template <class T> Foo<T>::~Foo() {

$ clang --analyze test.cc
0  clang           0x00000000010883d0
1  clang           0x0000000001088dca
2  libpthread.so.0 0x00007f8117fe5580
3  clang           0x00000000005a94f7
clang::GRExprEngine::VisitCall(clang::CallExpr const*, clang::ExplodedNode*,
clang::ConstExprIterator, clang::ConstExprIterator, clang::ExplodedNodeSet&,
bool) + 2119
4  clang           0x00000000005a71e8 clang::GRExprEngine::Visit(clang::Stmt
const*, clang::ExplodedNode*, clang::ExplodedNodeSet&) + 1512
5  clang           0x00000000005ad400
clang::GRExprEngine::ProcessStmt(clang::CFGElement, clang::GRStmtNodeBuilder&)
+ 928
6  clang           0x000000000059c3bb
clang::GRCoreEngine::HandleBlockEntrance(clang::BlockEntrance const&,
clang::ExplodedNode*) + 203
7  clang           0x000000000059c98e
clang::GRCoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned
int, clang::GRState const*) + 494
8  clang           0x000000000053ce82
9  clang           0x000000000053c266
10 clang           0x000000000053d98c
11 clang           0x000000000072fcf5 clang::ParseAST(clang::Sema&, bool) + 581
12 clang           0x00000000006619eb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 299
13 clang           0x000000000040871d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1005
14 clang           0x0000000000402e1e cc1_main(char const**, char const**, char
const*, void*) + 846
15 clang           0x0000000000407d2c main + 3772
16 libc.so.6       0x00007f8117787b2a __libc_start_main + 218
17 clang           0x000000000040026f
Stack dump:
0.    Program arguments: clang -cc1 -triple x86_64-unknown-linux-gnu -analyze
-disable-free -disable-llvm-verifier -main-file-name debug.cc
-analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-check-dead-stores -analyzer-check-objc-mem -analyzer-eagerly-assume
-analyzer-check-objc-methodsigs -analyzer-check-objc-unused-ivars
-analyzer-check-idempotent-operations -analyzer-output plist -w
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir lib/clang/2.0 -ferror-limit 19
-fmessage-length 138 -fexceptions -fgnu-runtime -fdiagnostics-show-option -o
debug.plist -x c++ test.cc 
1.    <eof> parser at end of file
2.    test.cc:8:3: Error evaluating statement
3.    test.cc:8:3: Error evaluating statement
clang: error: clang frontend command failed due to signal 11 (use -v to see

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list