[llvm-bugs] [Bug 40022] New: Assertion failure in RegionStoreManager::bindArray()

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 14 05:17:44 PST 2018


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

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

$ cat test-RegionStoreManager__bindArray.cc
struct f {
  typedef int b[];
};
struct g {
  f::b c;
};
using d = long;
using e = g;
struct i {
  d cookie;
};
struct j : i {
  e h;
};
void k() { j a{}; }

$  ./clang-tidy -checks="-*,clang-analyzer*"
test-RegionStoreManager__bindArray.cc -- -std=c++17                             
F1214 14:18:39.208130   39861 logging.cc:82] assert.h assertion failed at
third_party/llvm/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:105
in T clang::ento::SVal::castAs() const [T = clang::ento::nonloc::CompoundVal]:
T::isKind(*this)
*** Check failure stack trace: ***
    @     0x56443e738c76  __assert_fail
    @     0x56443c254b15  (anonymous
namespace)::RegionStoreManager::bindArray()
    @     0x56443c255073  (anonymous
namespace)::RegionStoreManager::bindStruct()
    @     0x56443c25516b  (anonymous
namespace)::RegionStoreManager::bindStruct()
    @     0x56443c24a798  (anonymous namespace)::RegionStoreManager::Bind()
    @     0x56443c264e5f  clang::ento::ProgramState::bindLoc()
    @     0x56443c02e069 
clang::ento::retaincountchecker::RetainCountChecker::checkBind()
    @     0x56443c035466  clang::ento::check::Bind::_checkBind<>()
    @     0x56443c2a1629  clang::ento::CheckerManager::runCheckersForBind()
    @     0x56443c2b4eb3  clang::ento::ExprEngine::evalBind()
    @     0x56443c2d424e  clang::ento::ExprEngine::VisitDeclStmt()
    @     0x56443c2b43fd  clang::ento::ExprEngine::Visit()
    @     0x56443c2b06af  clang::ento::ExprEngine::ProcessStmt()
    @     0x56443c2b0398  clang::ento::ExprEngine::processCFGElement()
    @     0x56443c2ce4c5  clang::ento::CoreEngine::HandlePostStmt()
    @     0x56443c2cd8be  clang::ento::CoreEngine::ExecuteWorkList()
    @     0x56443bfd2715  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @     0x56443bfbdd50  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @     0x56443c53120c  clang::MultiplexConsumer::HandleTranslationUnit()
    @     0x56443c6ec414  clang::ParseAST()
    @     0x56443c52ad63  clang::FrontendAction::Execute()
    @     0x56443c3df7e1  clang::CompilerInstance::ExecuteAction()
    @     0x56443c3387d1 
clang::tooling::FrontendActionFactory::runInvocation()
    @     0x56443bc3ac27 
clang::tidy::runClangTidy()::ActionFactory::runInvocation()
    @     0x56443c33853a  clang::tooling::ToolInvocation::runInvocation()
    @     0x56443c337f26  clang::tooling::ToolInvocation::run()
    @     0x56443c33a625  clang::tooling::ClangTool::run()
    @     0x56443bc3696f  clang::tidy::runClangTidy()
    @     0x5644396051f4  main

-- 
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/20181214/c31c353d/attachment.html>


More information about the llvm-bugs mailing list