[LLVMbugs] [Bug 6035] New: clang analyzer bug: Assertion `Loc::IsLocType(castTy)' failed.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Jan 13 15:32:45 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6035
Summary: clang analyzer bug: Assertion `Loc::IsLocType(castTy)'
failed.
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu
regehr at john-home:~/volatile/bugs/tmp258$ clang --analyze small.c -c
clang: warning: argument unused during compilation: '-c'
small.c:10:43: warning: declaration of 'struct pcm' will not be visible outside
of this function
feed_swaplr (struct pcm_feeder *f, struct pcm *c, uint8_t * b, uint32_t count,
^
small.c:15:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
small.c:14:3: warning: Value stored to 'bps' is never read
bps = (long) f->data;
^ ~~~~~~~~~~~~~~
clang: SValuator.cpp:119: clang::SValuator::CastResult
clang::SValuator::EvalCast(clang::SVal, const clang::GRState*, clang::QualType,
clang::QualType): Assertion `Loc::IsLocType(castTy)' failed.
0 clang 0x090ee918
Stack dump:
0. Program arguments: /home/regehr/z/tmp/llvm-gcc-r93238-install/bin/clang
-cc1 -triple i386-pc-linux-gnu -analyze -disable-free -main-file-name small.c
-analyzer-store=region -analyzer-opt-analyze-nested-blocks -warn-dead-stores
-warn-security-syntactic -checker-cfref -analyzer-eagerly-assume
-warn-objc-methodsigs -warn-objc-unused-ivars -analyzer-output plist
-mrelocation-model static -mdisable-fp-elim -target-cpu pentium4 -resource-dir
/home/regehr/z/tmp/llvm-gcc-r93238-install/lib/clang/1.1 -fmessage-length 80
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o small.plist -x c
small.c
1. <eof> parser at end of file
2. small.c:14:3: Error evaluating statement
3. small.c:14:3: Error evaluating statement
4. small.c:14:9: Error evaluating statement
clang: error: analyzer command failed due to signal 6 (use -v to see
invocation)
regehr at john-home:~/volatile/bugs/tmp258$ cat small.c
typedef unsigned char __uint8_t;
typedef unsigned int __uint32_t;
typedef __uint8_t uint8_t;
typedef __uint32_t uint32_t;
struct pcm_feeder
{
void *data;
};
int
feed_swaplr (struct pcm_feeder *f, struct pcm *c, uint8_t * b, uint32_t count,
void *source)
{
int bps;
bps = (long) f->data;
}
regehr at john-home:~/volatile/bugs/tmp258$ clang -v
clang version 1.1 (trunk 93238)
Target: i386-pc-linux-gnu
Thread model: posix
--
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