[llvm-bugs] [Bug 37139] New: Crash in clang::ento::ExprEngine::getRegionForConstructedObject

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 16 07:30:33 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37139

            Bug ID: 37139
           Summary: Crash in
                    clang::ento::ExprEngine::getRegionForConstructedObject
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: alexfh at google.com
                CC: llvm-bugs at lists.llvm.org

$ cat test-clang__ento__ExprEngine__getRegionForConstructedObject.cc
class a {};
struct b {
  long c;
  const a &d;
};
void fn1() { b e{0, a()}; }
$ ./clang-tidy -checks=-*,clang-analyzer-core*
test-clang__ento__ExprEngine__getRegionForConstructedObject.cc -- -std=c++11
assert.h assertion failed at
tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:187 in const
clang::ento::MemRegion
*clang::ento::ExprEngine::getRegionForConstructedObject(const
clang::CXXConstructExpr *, clang::ento::ExplodedNode *, const
clang::ConstructionContext *, clang::ento::ExprEngine::EvalCallOptions &):
VD->getType()->isReferenceType()
    @     0x564ea13a63f6  __assert_fail
    @     0x564e9f18c2e9 
clang::ento::ExprEngine::getRegionForConstructedObject()
    @     0x564e9f18c6e2  clang::ento::ExprEngine::VisitCXXConstructExpr()
    @     0x564e9f15d5c7  clang::ento::ExprEngine::Visit()
    @     0x564e9f159fae  clang::ento::ExprEngine::ProcessStmt()
    @     0x564e9f159ccb  clang::ento::ExprEngine::processCFGElement()
    @     0x564e9f17f155  clang::ento::CoreEngine::HandlePostStmt()
    @     0x564e9f17e40d  clang::ento::CoreEngine::ExecuteWorkList()
    @     0x564e9eeac20c  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @     0x564e9eeabd86  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @     0x564e9ee97af4  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @     0x564e9f43fb5c  clang::MultiplexConsumer::HandleTranslationUnit()
    @     0x564e9f5e13a4  clang::ParseAST()
    @     0x564e9f439013  clang::FrontendAction::Execute()
    @     0x564e9f2db381  clang::CompilerInstance::ExecuteAction()
    @     0x564e9f1e2411 
clang::tooling::FrontendActionFactory::runInvocation()
    @     0x564e9f1e217a  clang::tooling::ToolInvocation::runInvocation()
    @     0x564e9f1e1946  clang::tooling::ToolInvocation::run()
    @     0x564e9f1e40c3  clang::tooling::ClangTool::run()
    @     0x564e9eb4e88f  clang::tidy::runClangTidy()

-- 
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/20180416/ed692988/attachment.html>


More information about the llvm-bugs mailing list