-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 9287 |
| Resolution | FIXED |
| Resolved on | Feb 23, 2011 21:09 |
| Version | trunk |
| OS | All |
| Attachments | reduced case |
| Reporter | LLVM Bugzilla Contributor |
| CC | @tkremenek |
Extended Description
clang crash when trying to analyze this reduced case:
int test(int type) { return type ? : 0; }
% clang --analyze ternary.c
Assertion failed: (B->succ_size() == 2), function HandleBranch, file /Volumes/MacPro/Projects/OpenSource/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp, line 429.
0 clang 0x0000000100f200a2 PrintStackTrace(void*) + 34
1 clang 0x0000000100f205f9 SignalHandler(int) + 745
2 libSystem.B.dylib 0x00007fff82f6e67a _sigtramp + 26
3 libSystem.B.dylib 0x0000000102012d50 _sigtramp + 2131379952
4 clang 0x0000000100011a16 abort + 22
5 clang 0x00000001000119d8 __assert_rtn + 56
6 clang 0x0000000100526770 clang::ento::CoreEngine::HandleBlockExit(clang::CFGBlock const*, clang::ento::ExplodedNode*) + 1776
7 clang 0x0000000100525d68 clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int, clang::ento::ExplodedNode*) + 72
8 clang 0x0000000100525401 clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned int, clang::ento::GRState const*) + 481
9 clang 0x000000010049ff73 ActionObjCMemCheckerAux((anonymous namespace)::AnalysisConsumer&, clang::ento::AnalysisManager&, clang::Decl*, bool) + 1123
[…]
21 clang 0x000000000000002b start + 4294893883
Stack dump:
0. Program arguments: /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/bin/clang -cc1 -triple x86_64-apple-darwin10.0.0 -analyze -disable-free -main-file-name ternary.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=unix -analyzer-checker=macosx -analyzer-check-objc-mem -analyzer-eagerly-assume -analyzer-output plist -w -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 97.17 -resource-dir /Volumes/MacPro/Projects/OpenSource/llvm/release/Release+Asserts/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 262 -stack-protector 1 -fblocks -fdiagnostics-show-option -fcolor-diagnostics -o ternary.plist -x c ternary.c
- parser at end of file
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 1 (use -v to see invocation)