[LLVMbugs] [Bug 10797] New: [analyzer] Crash: "cast<Ty>() argument of incompatible type!" assert when analyzing ICU

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Aug 28 04:55:40 PDT 2011


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

           Summary: [analyzer] Crash: "cast<Ty>() argument of incompatible
                    type!" assert when analyzing ICU
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu


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

$ ../third_party/llvm-build/Release+Asserts/bin/clang --version
clang version 3.0 (trunk 138598)
Target: x86_64-apple-darwin10.8.0
Thread model: posix


Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file
/Users/thakis/src/chrome-git/src/third_party/llvm/include/llvm/Support/Casting.h,
line 194.
0  clang             0x00000001019f62b2 PrintStackTrace(void*) + 34
1  clang             0x00000001019f7103 SignalHandler(int) + 707
2  libSystem.B.dylib 0x00007fff80f0d1ba _sigtramp + 26
3  clang             0x00000001019e2190 llvm::FoldingSetNodeID::AddPointer(void
const*) + 112
4  clang             0x000000010001d4a2 __assert_rtn + 66
5  clang             0x000000010078eb6d
getSymbolForRegion(clang::ento::CheckerContext&, clang::ento::MemRegion const*)
+ 93
6  clang             0x000000010079373b void
clang::ento::check::PreStmt<clang::ReturnStmt>::_checkStmt<(anonymous
namespace)::MacOSKeychainAPIChecker>(void*, clang::Stmt const*,
clang::ento::CheckerContext&) + 123
7  clang             0x000000010081d7a6
clang::ento::CheckerManager::runCheckersForStmt(bool,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&, clang::Stmt
const*, clang::ento::ExprEngine&) + 694
8  clang             0x000000010084413d
clang::ento::ExprEngine::VisitReturnStmt(clang::ReturnStmt const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 397
9  clang             0x000000010083602c
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 2844
10 clang             0x0000000100837a05
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::StmtNodeBuilder&) + 789
11 clang             0x00000001008387ed
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::StmtNodeBuilder&) + 237
12 clang             0x00000001008252ec
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 188
13 clang             0x00000001008254d8
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, clang::ento::ProgramState const*) + 216
14 clang             0x00000001007433e4 ActionExprEngine((anonymous
namespace)::AnalysisConsumer&, clang::ento::AnalysisManager&, clang::Decl*,
clang::ento::TransferFuncs*) + 196
15 clang             0x0000000100743d33 (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*) + 899
16 clang             0x000000010074470d (anonymous
namespace)::AnalysisConsumer::HandleDeclContext(clang::ASTContext&,
clang::DeclContext*) + 957
17 clang             0x0000000100744c65 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) + 405
18 clang             0x00000001003337c4 clang::ParseAST(clang::Sema&, bool) +
452
19 clang             0x00000001000485a1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 433
20 clang             0x0000000100028077
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1735
21 clang             0x000000010001e7fc cc1_main(char const**, char const**,
char const*, void*) + 652
22 clang             0x0000000100026dbe main + 4542
23 clang             0x000000010001dbe4 start + 52
24 clang             0x000000000000005c start + 4294845612
Stack dump:
0.    Program arguments:
/Users/thakis/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin//clang
-cc1 -triple i386-apple-macosx10.5.0 -analyze -disable-free -main-file-name
cmemory.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=deadcode
-analyzer-checker=security -analyzer-checker=unix -analyzer-checker=osx
-analyzer-output plist -w -pic-level 1 -mdisable-fp-elim -masm-verbose
-target-cpu yonah -target-linker-version 97.17 -resource-dir
/Users/thakis/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.0
-isysroot /Developer/SDKs/MacOSX10.5.sdk -D U_USING_ICU_NAMESPACE=0 -D
U_STATIC_IMPLEMENTATION -D CHROMIUM_BUILD -D ENABLE_REMOTING=1 -D
ENABLE_P2P_APIS=1 -D ENABLE_CONFIGURATION_POLICY -D ENABLE_GPU=1 -D
ENABLE_EGLIMAGE=1 -D ENABLE_REGISTER_PROTOCOL_HANDLER=1 -D
U_COMMON_IMPLEMENTATION -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D
WTF_USE_DYNAMIC_ANNOTATIONS=1
-F/Users/thakis/src/chrome-git/src/third_party/icu/../../xcodebuild/Debug -I
/Users/thakis/src/chrome-git/src/third_party/icu/../../xcodebuild/Debug/include
-I public/common -I public/i18n -I source/common -I source/i18n -I
/Users/thakis/src/chrome-git/src/third_party/icu/../../xcodebuild/icu.build/Debug/icuuc.build/DerivedSources/i386
-I
/Users/thakis/src/chrome-git/src/third_party/icu/../../xcodebuild/icu.build/Debug/icuuc.build/DerivedSources
-Wno-trigraphs -Wno-unused-parameter -Wno-missing-field-initializers
-Wno-char-subscripts -Wno-unused-function -Wno-unnamed-type-template-args
-Wno-parentheses -std=c99 -ferror-limit 19 -fmessage-length 0 -stack-protector
1 -fblocks -fdiagnostics-show-option -analyzer-output=html -o
/var/folders/++/++1Gyk++6+0++4RjPqRgNE++ojg/-Tmp-/scan-build-2011-08-28-2 -x c
/Users/thakis/src/chrome-git/src/third_party/icu/source/common/cmemory.c 
1.    <eof> parser at end of file
2.   
/Users/thakis/src/chrome-git/src/third_party/icu/source/common/cmemory.c:48:9:
Error evaluating statement
3.   
/Users/thakis/src/chrome-git/src/third_party/icu/source/common/cmemory.c:48:9:
Error evaluating statement

-- 
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