[LLVMbugs] [Bug 8648] New: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Nov 18 09:16:12 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8648
Summary: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: dave at jikos.cz
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=5798)
--> (http://llvm.org/bugs/attachment.cgi?id=5798)
preprocessed source, compiler output
clang crashes with when analyzing linux kernel/time/clockevents.c:
ANALYZE: kernel/time/clockevents.c clockevents_program_event
clang:
/usr/src/packages/BUILD/llvm-2.9svn119697/include/llvm/Support/Casting.h:202:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::Loc, Y
= clang::SVal, typename llvm::cast_retty<To, From>::ret_type = clang::Loc&]:
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
0 clang 0x0000000001877d0f
1 clang 0x00000000018784ba
2 libpthread.so.0 0x00002b8d0b4ea2e0
3 libc.so.6 0x00002b8d0c0a79e5 gsignal + 53
4 libc.so.6 0x00002b8d0c0a8ee6 abort + 390
5 libc.so.6 0x00002b8d0c0a0235 __assert_fail + 245
6 clang 0x0000000000ca1b0a
clang::StoreManager::getLValueFieldOrIvar(clang::Decl const*, clang::SVal) +
282
7 clang 0x0000000000bc8c10
clang::StoreManager::getLValueField(clang::FieldDecl const*, clang::SVal) + 32
8 clang 0x0000000000c2c26a
clang::GRExprEngine::VisitMemberExpr(clang::MemberExpr const*,
clang::ExplodedNode*, clang::ExplodedNodeSet&, bool) + 522
9 clang 0x0000000000c2c906 clang::GRExprEngine::Visit(clang::Stmt
const*, clang::ExplodedNode*, clang::ExplodedNodeSet&) + 1382
10 clang 0x0000000000c31403
clang::GRExprEngine::VisitBinaryOperator(clang::BinaryOperator const*,
clang::ExplodedNode*, clang::ExplodedNodeSet&, bool) + 771
11 clang 0x0000000000c2ccf9 clang::GRExprEngine::Visit(clang::Stmt
const*, clang::ExplodedNode*, clang::ExplodedNodeSet&) + 2393
12 clang 0x0000000000c34b86
clang::GRExprEngine::ProcessStmt(clang::CFGStmt, clang::GRStmtNodeBuilder&) +
870
13 clang 0x0000000000c352d8
clang::GRExprEngine::ProcessElement(clang::CFGElement,
clang::GRStmtNodeBuilder&) + 56
14 clang 0x0000000000c21354
clang::GRCoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ExplodedNode*) + 196
15 clang 0x0000000000c222cd
clang::GRCoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned
int, clang::GRState const*) + 749
16 clang 0x0000000000ba9337
17 clang 0x0000000000ba8541
18 clang 0x0000000000ba8e33
19 clang 0x0000000000945ded clang::ParseAST(clang::Sema&, bool) + 301
20 clang 0x00000000006de265
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
21 clang 0x00000000006bcc5a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1274
22 clang 0x00000000006b3cf8 cc1_main(char const**, char const**, char
const*, void*) + 664
23 clang 0x00000000006bbc69 main + 4057
24 libc.so.6 0x00002b8d0c093b7d __libc_start_main + 253
25 clang 0x00000000006b3859
Stack dump:
0. Program arguments: /usr/bin/clang -cc1
-DIBOutlet=__attribute__((iboutlet)) -cc1 -triple x86_64-unknown-linux-gnu
-fsyntax-only -disable-free -main-file-name clockeven
ts.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
11.3 -nostdinc -resource-dir /us
r/bin/../lib/clang/2.9 -isystem /usr/lib64/gcc/x86_64-suse-linux/4.5/include
-include include/generated/autoconf.h -D __KERNEL__ -D CONFIG_AS_CFI=1 -D
CONFIG_AS_CFI_SIGNAL_FRA
ME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CC_HAVE_ASM_GOTO -D
KBUILD_STR(s)=#s -D KBUILD_BASENAME=KBUILD_STR(clockevents) -D
KBUILD_MODNAME=KBUILD_STR(clockev
ents) -I /home/dsterba/_kernel/linux-2.6/arch/x86/include -I include
-Wno-trigraphs -Wno-format-security -Wno-sign-compare -Wno-pointer-sign
-ferror-limit 19 -fmessage-length
0 -fgnu-runtime -fdiagnostics-show-option -x c kernel/time/clockevents.c
-analyze -analyzer-display-progress -analyzer-eagerly-assume
-analyzer-opt-analyze-nested-blocks -anal
yzer-check-objc-mem -analyzer-check-idempotent-operations
-analyzer-check-security-syntactic -analyzer-check-dead-stores
-analyzer-check-objc-unused-ivars -analyzer-check-objc
-methodsigs -analyzer-store=region -analyzer-constraints=range
-analyzer-output=html -o
/home/dsterba/_kernel/linux-2.6/SCAN-allno/2010-11-18-1
1. <eof> parser at end of file
2. kernel/time/clockevents.c:115:2: Error evaluating statement
3. kernel/time/clockevents.c:115:2: Error evaluating statement
4. kernel/time/clockevents.c:115:10
<Spelling=include/linux/ktime.h:131:28>: Error evaluating statement
clang svn version: 119697
--
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