[llvm-bugs] [Bug 36458] New: Assertion failure in clang::ento::ElementRegion::ElementRegion

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 20 08:10:04 PST 2018


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

            Bug ID: 36458
           Summary: Assertion failure in
                    clang::ento::ElementRegion::ElementRegion
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: alexfh at google.com
                CC: ekarpenkov at apple.com, llvm-bugs at lists.llvm.org

$ cat test-ElementRegion__ElementRegion.c
typedef struct {
  void *a
} b;
c(*e) {
  b *d = g();
  *e = d->a;
  int *f;
  c(&f);
  *f = 1;
}
$ clang-tidy -checks=-*,clang-analyzer* test-ElementRegion__ElementRegion.c --
assert.h assertion failed at
llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1083
in clang::ento::ElementRegion::ElementRegion(clang::QualType,
clang::ento::NonLoc, const clang::ento::SubRegion *): !elementType.isNull() &&
!elementType->isVoidType() && "Invalid region type!"
    @     0x5600957f9b76  __assert_fail
    @     0x5600942c0f60  clang::ento::ElementRegion::ElementRegion()
    @     0x5600942c0de5  clang::ento::MemRegionManager::getElementRegion()
    @     0x56009426f19e  (anonymous namespace)::RegionStoreManager::bind()
    @     0x560094264e58  (anonymous namespace)::RegionStoreManager::Bind()
    @     0x5600942a1f45  clang::ento::ProgramState::bindLoc()
    @     0x5600942f47a0  clang::ento::ExprEngine::evalBind()
    @     0x5600942fc855  clang::ento::ExprEngine::evalStore()
    @     0x56009431725f  clang::ento::ExprEngine::VisitBinaryOperator()
    @     0x5600942f41ae  clang::ento::ExprEngine::Visit()
    @     0x5600942ef89e  clang::ento::ExprEngine::ProcessStmt()
    @     0x5600942ef59b  clang::ento::ExprEngine::processCFGElement()
    @     0x560094311095  clang::ento::CoreEngine::HandlePostStmt()
    @     0x56009431034d  clang::ento::CoreEngine::ExecuteWorkList()
    @     0x5600933389a2  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @     0x560093338526  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @     0x5600933228d4  (anonymous
namespace)::AnalysisConsumer::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/20180220/517191ec/attachment.html>


More information about the llvm-bugs mailing list