[llvm-bugs] [Bug 28449] New: core assertion failure

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 7 04:50:18 PDT 2016


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

            Bug ID: 28449
           Summary: core assertion failure
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: bagnara at cs.unipr.it
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16706
  --> https://llvm.org/bugs/attachment.cgi?id=16706&action=edit
Testcase from GCC testsuite allowing to reproduce the failure.

$ ~/llvm-build/bin/clang -cc1 -analyze -analyzer-checker=core pr48517.c
clang: /home/roberto/llvm/include/llvm/Support/Casting.h:237: typename
llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X =
clang::ento::StringRegion; Y = const clang::ento::MemRegion; typename
llvm::cast_retty<X, Y*>::ret_type = const clang::ento::StringRegion*]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
#0 0x000000000304f1c1 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/roberto/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x000000000304f51c PrintStackTraceSignalHandler(void*)
/home/roberto/llvm/lib/Support/Unix/Signals.inc:470:0
#2 0x000000000304d7f2 llvm::sys::RunSignalHandlers()
/home/roberto/llvm/lib/Support/Signals.cpp:44:0
#3 0x000000000304eb39 SignalHandler(int)
/home/roberto/llvm/lib/Support/Unix/Signals.inc:256:0
#4 0x00007f2b024a2330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007f2b0128ec37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007f2b01292028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007f2b01287bf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#8 0x00007f2b01287ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x0000000004f421e4 llvm::cast_retty<clang::ento::StringRegion,
clang::ento::MemRegion const*>::ret_type llvm::cast<clang::ento::StringRegion,
clang::ento::MemRegion const>(clang::ento::MemRegion const*)
/home/roberto/llvm/include/llvm/Support/Casting.h:239:0
#10 0x0000000005246fee (anonymous
namespace)::RegionStoreManager::bindArray((anonymous
namespace)::RegionBindingsRef const&, clang::ento::TypedValueRegion const*,
clang::ento::SVal)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2063:0
#11 0x0000000005246ae1 (anonymous
namespace)::RegionStoreManager::bind((anonymous namespace)::RegionBindingsRef
const&, clang::ento::Loc, clang::ento::SVal)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1998:0
#12 0x000000000524043e (anonymous namespace)::RegionStoreManager::Bind(void
const*, clang::ento::Loc, clang::ento::SVal)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp:406:0
#13 0x0000000005229a30 clang::ento::ProgramState::bindLoc(clang::ento::Loc,
clang::ento::SVal, bool) const
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp:117:0
#14 0x00000000051e1c33
clang::ento::ExprEngine::evalBind(clang::ento::ExplodedNodeSet&, clang::Stmt
const*, clang::ento::ExplodedNode*, clang::ento::SVal, clang::ento::SVal, bool,
clang::ProgramPoint const*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:2223:0
#15 0x00000000051f8ae6 clang::ento::ExprEngine::VisitDeclStmt(clang::DeclStmt
const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp:541:0
#16 0x00000000051dca18 clang::ento::ExprEngine::Visit(clang::Stmt const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1200:0
#17 0x00000000051d9034 clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:449:0
#18 0x00000000051d8382
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:297:0
#19 0x00000000051c74d1 clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock
const*, unsigned int, clang::ento::ExplodedNode*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:522:0
#20 0x00000000051c64be
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:280:0
#21 0x00000000051c609e
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:217:0
#22 0x00000000043f22c2
clang::ento::ExprEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int)
/home/roberto/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:109:0
#23 0x00000000043bb65c (anonymous
namespace)::AnalysisConsumer::ActionExprEngine(clang::Decl*, bool,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:668:0
#24 0x00000000043bb77c (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks(clang::Decl*,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:685:0
#25 0x00000000043bb43e (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:632:0
#26 0x00000000043baaae (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph(unsigned int)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:498:0
#27 0x00000000043bae71 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/roberto/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:549:0
#28 0x00000000044413f6 clang::ParseAST(clang::Sema&, bool, bool)
/home/roberto/llvm/tools/clang/lib/Parse/ParseAST.cpp:169:0
#29 0x00000000037712d2 clang::ASTFrontendAction::ExecuteAction()
/home/roberto/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:558:0
#30 0x0000000003770d97 clang::FrontendAction::Execute()
/home/roberto/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:461:0
#31 0x0000000003722802
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/roberto/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:877:0
#32 0x000000000386cffb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/roberto/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:241:0
#33 0x00000000017f3d8b cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/roberto/llvm/tools/clang/tools/driver/cc1_main.cpp:116:0
#34 0x00000000017ea400 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef) /home/roberto/llvm/tools/clang/tools/driver/driver.cpp:301:0
#35 0x00000000017eaef9 main
/home/roberto/llvm/tools/clang/tools/driver/driver.cpp:382:0
#36 0x00007f2b01279f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#37 0x00000000017e7de9 _start (/home/roberto/llvm-build/bin/clang+0x17e7de9)
Stack dump:
0.    Program arguments: /home/roberto/llvm-build/bin/clang -cc1 -analyze
-analyzer-checker=core pr48517.c 
1.    <eof> parser at end of file
2.    While analyzing stack: 
    #0 void foo()
3.    pr48517.c:10:3: Error evaluating statement
4.    pr48517.c:10:3: Error evaluating statement
Aborted

-- 
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/20160707/901cdfdc/attachment-0001.html>


More information about the llvm-bugs mailing list