[llvm-bugs] [Bug 34374] New: Assertion failure in QualType::getCommonPtr (via clang::ento::MemRegionManager::getElementRegion)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 30 02:21:37 PDT 2017


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

            Bug ID: 34374
           Summary: Assertion failure in QualType::getCommonPtr (via
                    clang::ento::MemRegionManager::getElementRegion)
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: alexfh at google.com
                CC: llvm-bugs at lists.llvm.org

$ cat getElementRegion-crash2.cc
typedef struct { int x0; } x1;
struct x2 {
  bool x3();
  x1 *x4;
  int x5;
} * x6;
bool x2::x3() {
  x5 = reinterpret_cast<unsigned char *>(x6) -
       reinterpret_cast<unsigned char *>(1);
  x1 x7 = x4[0];
  x5 + x7.x0;
}
$ clang-tidy -checks=-*,clang-analyzer-* getElementRegion-crash2.cc --
-sdt=c++11
assert.h assertion failed at clang/include/clang/AST/Type.h:628 in const
clang::ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const: !isNull()
&& "Cannot retrieve a NULL type pointer"
    @          0x544749a  __assert_fail
    @           0x5e9285  clang::QualType::getCommonPtr()
    @           0x5dde09  clang::QualType::getCanonicalType()
    @          0x1b6304c  clang::ASTContext::getCanonicalType()
    @          0x2dc1122  clang::ento::MemRegionManager::getElementRegion()
    @          0x2e73258  (anonymous
namespace)::SimpleSValBuilder::evalBinOpLN()
    @          0x2d2a8ee  clang::ento::SValBuilder::evalBinOp()
    @          0x2e74db4  (anonymous
namespace)::SimpleSValBuilder::simplifySVal()::Simplifier::VisitSymIntExpr()
    @          0x2e74992  clang::ento::SymExprVisitor<>::Visit()
    @          0x2e746ea  (anonymous
namespace)::SimpleSValBuilder::simplifySVal()::Simplifier::VisitNonLocSymbolVal()
    @          0x2e7426b  clang::ento::SValVisitor<>::Visit()
    @          0x2e7352f  (anonymous
namespace)::SimpleSValBuilder::simplifySVal()
    @          0x2e709cb  (anonymous
namespace)::SimpleSValBuilder::evalBinOpNN()
    @          0x2d2abb2  clang::ento::SValBuilder::evalBinOp()
    @          0x2e1d316  clang::ento::ExprEngine::evalBinOp()
    @          0x2e4af60  clang::ento::ExprEngine::VisitBinaryOperator()
    @          0x2e12cdb  clang::ento::ExprEngine::Visit()
    @          0x2e0fe44  clang::ento::ExprEngine::ProcessStmt()
    @          0x2e0faca  clang::ento::ExprEngine::processCFGElement()
    @          0x2e3dc66  clang::ento::CoreEngine::HandlePostStmt()
    @          0x2e3d566  clang::ento::CoreEngine::dispatchWorkItem()
    @          0x2e3d0a8  clang::ento::CoreEngine::ExecuteWorkList()
    @          0x2138e05  clang::ento::ExprEngine::ExecuteWorkList()
    @          0x20e1802  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @          0x20e15c1  (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks()
    @          0x20e1285  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @          0x20d4963  (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph()
    @          0x20d2be7  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @          0x25136ce  clang::MultiplexConsumer::HandleTranslationUnit()

-- 
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/20170830/076d61d8/attachment.html>


More information about the llvm-bugs mailing list