[LLVMbugs] [Bug 3422] New: clang: static analyzer crash when analyzing aspack.c

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jan 27 02:43:16 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3422

           Summary: clang: static analyzer crash when analyzing aspack.c
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2453)
 --> (http://llvm.org/bugs/attachment.cgi?id=2453)
preprocessed file

On SVN r63101, x86-64 Linux:

ANALYZE: ../../../clamav-devel/libclamav/aspack.c readstream
ANALYZE: ../../../clamav-devel/libclamav/aspack.c getdec
ANALYZE: ../../../clamav-devel/libclamav/aspack.c build_decrypt_array
../../../clamav-devel/libclamav/aspack.c:147:3: warning: dead assignment
  i = 0;
  ^   ~
ANALYZE: ../../../clamav-devel/libclamav/aspack.c getbits
ANALYZE: ../../../clamav-devel/libclamav/aspack.c build_decrypt_dictionaries
ANALYZE: ../../../clamav-devel/libclamav/aspack.c decrypt
ANALYZE: ../../../clamav-devel/libclamav/aspack.c decomp_block
ANALYZE: ../../../clamav-devel/libclamav/aspack.c unaspack212
clang: /home/edwin/llvm-svn/llvm/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::PointerType, Y = clang::Type*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
0   clang     0x0000000001036e4f
1   libc.so.6 0x00002b8d4aafbf60
2   libc.so.6 0x00002b8d4aafbed5 gsignal + 53
3   libc.so.6 0x00002b8d4aafd3f3 abort + 387
4   libc.so.6 0x00002b8d4aaf4dc9 __assert_fail + 233
5   clang     0x0000000000a6bb86
6   clang     0x0000000000a6a4d1
clang::ElementRegion::getRValueType(clang::ASTContext&) const + 97
7   clang     0x0000000000a6bb9a
clang::TypedRegion::getLValueType(clang::ASTContext&) const + 10
8   clang     0x0000000000a14e8f
9   clang     0x0000000000a52533 clang::GRExprEngine::VisitCast(clang::Expr*,
clang::Expr*, clang::ExplodedNode<clang::GRState>*,
clang::ExplodedNodeSet<clang::GRState>&) + 2675
10  clang     0x0000000000a4d317 clang::GRExprEngine::Visit(clang::Stmt*,
clang::ExplodedNode<clang::GRState>*, clang::ExplodedNodeSet<clang::GRState>&)
+ 951
11  clang     0x0000000000a502a1
clang::GRExprEngine::VisitBinaryOperator(clang::BinaryOperator*,
clang::ExplodedNode<clang::GRState>*, clang::ExplodedNodeSet<clang::GRState>&)
+ 545
12  clang     0x0000000000a4d2e8 clang::GRExprEngine::Visit(clang::Stmt*,
clang::ExplodedNode<clang::GRState>*, clang::ExplodedNodeSet<clang::GRState>&)
+ 904
13  clang     0x0000000000a539cf clang::GRExprEngine::ProcessStmt(clang::Stmt*,
clang::GRStmtNodeBuilder<clang::GRState>&) + 591
14  clang     0x0000000000a58c65
clang::GRCoreEngine<clang::GRExprEngine>::ProcessStmt(clang::Stmt*,
clang::GRStmtNodeBuilderImpl&) + 85
15  clang     0x0000000000a4469d
clang::GRCoreEngineImpl::HandlePostStmt(clang::PostStmt const&,
clang::CFGBlock*, unsigned int, clang::ExplodedNodeImpl*) + 205
16  clang     0x0000000000a44b84
clang::GRCoreEngineImpl::ExecuteWorkList(unsigned int) + 484
17  clang     0x000000000059ad0c
18  clang     0x000000000059a715
19  clang     0x000000000059aac6
20  clang     0x0000000000a862e5 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, bool, bool) + 245
21  clang     0x00000000005cfe14
22  clang     0x00000000005d4d67 main + 1383
23  libc.so.6 0x00002b8d4aae81a6 __libc_start_main + 230
24  clang     0x0000000000592f89 std::ios_base::Init::~Init() + 65


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list