[llvm-bugs] [Bug 34731] New: Assertion failure in clang::ento::FindLastStoreBRVisitor::VisitNode

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 26 02:01:42 PDT 2017


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

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

$ cat test-FindLastStoreBRVisitor.cc
int b;
class c {
  class B {
   public:
    double ***d;
    B();
  };
  void e(double **, int);
  void f(B &, int &);
};
void c::f(B &g, int &i) {
  e(g.d[9], i);
  B h, a;
  a.d == __null;
  a.d != h.d;
  f(h, b);
}
$ clang-tidy -checks=-*,clang-analyzer* test-FindLastStoreBRVisitor.cc --
-std=c++11
assert.h assertion failed at llvm/include/llvm/Support/Casting.h:255 in
typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = clang::ParmVarDecl,
Y = const clang::VarDecl]: isa<X>(Val) && "cast<Ty>() argument of incompatible
type!"
*** Check failure stack trace: ***
    @          0x530f90a  __assert_fail
    @          0x19b5e89  llvm::cast<>()
    @          0x1c29fad  clang::ento::FindLastStoreBRVisitor::VisitNode()
    @          0x1ba9f2b  GenerateMinimalPathDiagnostic()
    @          0x1ba4b08  clang::ento::GRBugReporter::generatePathDiagnostic()
    @          0x1bac31d  clang::ento::BugReporter::FlushReport()
    @          0x1ba4140  clang::ento::BugReporter::FlushReport()
    @          0x1ba3f76  clang::ento::BugReporter::FlushReports()
    @           0xf339a1  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @           0xf336b1  (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks()
    @           0xf33375  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @           0xf26a53  (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph()
    @           0xf24cd7  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @          0x135e04e  clang::MultiplexConsumer::HandleTranslationUnit()
    @          0x1db6d66  clang::ParseAST()
    @          0x134b8ea  clang::ASTFrontendAction::ExecuteAction()
    @          0x134b380  clang::FrontendAction::Execute()
    @          0x1161602  clang::CompilerInstance::ExecuteAction()
    @          0x102b612 
clang::tooling::FrontendActionFactory::runInvocation()
    @          0x102b4b3  clang::tooling::ToolInvocation::runInvocation()
    @          0x1029d76  clang::tooling::ToolInvocation::run()
    @          0x102c6a0  clang::tooling::ClangTool::run()
    @           0x894d74  clang::tidy::runClangTidy()
    @           0x5df191  clang::tidy::clangTidyMain()
    @           0x5de6c2  main
    @     0x7fe31316cbbd  __libc_start_main
    @           0x5de2b9  _start

-- 
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/20170926/730f81d5/attachment.html>


More information about the llvm-bugs mailing list