[llvm-bugs] [Bug 37357] New: Assertion failure in RegionStoreManager::getBindingForField()

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 7 11:47:31 PDT 2018


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

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

A recently (after ~r331500) introduced issue.

$ cat test.c
a() {
  const union { float b } c = {};
  c.b;
}
$ ./clang-tidy -checks=-*,clang-analyzer* test.c --
assert.h assertion failed at include/clang/AST/Expr.h:3943 in const clang::Expr
*clang::InitListExpr::getInit(unsigned int) const: Init < getNumInits() &&
"Initializer access out of range!"
    @     0x56456472e026  __assert_fail
    @     0x56456244c71b  (anonymous
namespace)::RegionStoreManager::getBindingForField()
    @     0x56456244bf44  (anonymous
namespace)::RegionStoreManager::getBinding()
    @     0x564562445ab4  (anonymous
namespace)::RegionStoreManager::getBinding()
    @     0x56456246eb46  clang::ento::ProgramState::getSVal()
    @     0x5645624c2ce2  clang::ento::ExprEngine::evalLoad()
    @     0x5645624e072c  clang::ento::ExprEngine::VisitCast()
    @     0x5645624b8b8b  clang::ento::ExprEngine::Visit()
    @     0x5645624b5c9e  clang::ento::ExprEngine::ProcessStmt()
    @     0x5645624b59bb  clang::ento::ExprEngine::processCFGElement()
    @     0x5645624d9ef5  clang::ento::CoreEngine::HandlePostStmt()
    @     0x5645624d934d  clang::ento::CoreEngine::ExecuteWorkList()
    @     0x56456220d68c  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @     0x56456220d206  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @     0x5645621f8f74  (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/20180507/2bd42ec7/attachment.html>


More information about the llvm-bugs mailing list