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

            Bug ID: 46253
           Summary: malloc analyzer check crashes
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcough...@apple.com
          Reporter: hok...@google.com
                CC: dcough...@apple.com, llvm-bugs@lists.llvm.org

./clang-tidy -checks="-*,clang-analyzer*" /tmp/crash.cpp


crash.cpp:

class a {
  void realloc(int, bool = false) { realloc(1); }
};


assert.h assertion failed at
llvm-project/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:427 in
clang::ento::SVal
clang::ento::SValBuilder::evalBinOp(clang::ento::ProgramStateRef,
BinaryOperator::Opcode, clang::ento::SVal, clang::ento::SVal, clang::QualType):
op == BO_Add
*** Check failure stack trace: ***
    @     0x564aecc437c6  __assert_fail
    @     0x564aeb336cbf  clang::ento::SValBuilder::evalBinOp()
    @     0x564aeb336efc  clang::ento::SValBuilder::evalEQ()
    @     0x564aeb13e777  (anonymous namespace)::MallocChecker::ReallocMemAux()
    @     0x564aeb135ba2  (anonymous namespace)::MallocChecker::checkRealloc()
    @     0x564aeb1454bd  clang::ento::check::PostCall::_checkCall<>()
    @     0x564aeb29b3f2 
clang::ento::CheckerManager::runCheckersForCallEvent()
    @     0x564aeb2e067e  clang::ento::ExprEngine::evalCall()
    @     0x564aeb2e0333  clang::ento::ExprEngine::VisitCallExpr()
    @     0x564aeb2bfe8d  clang::ento::ExprEngine::Visit()
    @     0x564aeb2bb96c  clang::ento::ExprEngine::ProcessStmt()
    @     0x564aeb2bb648  clang::ento::ExprEngine::processCFGElement()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to