[LLVMbugs] [Bug 19539] New: Analyzer crashes on temporaries life-extended via members

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 23 20:24:52 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19539

            Bug ID: 19539
           Summary: Analyzer crashes on temporaries life-extended via
                    members
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: alexfh at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

struct S {
  ~S(){}
};
struct A {
  int i;
  S s;
};
void f() {
  const int& i = A().i;
}

When analyzing the code above, static analyzer crashes with the assertion in
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:317: "RecordDecl && \"Only
CXXRecordDecls should have destructors\"".

The reason is that ExprEngine::ProcessAutomaticObjDtor tries to get destructor
of the type of the variable. Instead, it should determine all life-extended
temporaries from the variable initializer expression (probably, by getting all
CXXBindTemporaryExpr nodes in the initializer expression?).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140424/9642909b/attachment.html>


More information about the llvm-bugs mailing list