[LLVMbugs] [Bug 9116] New: assertion failed in IdempotentOperationChecker.cpp
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 1 05:29:44 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9116
Summary: assertion failed in IdempotentOperationChecker.cpp
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: devlists at shadowlab.org
CC: llvmbugs at cs.uiuc.edu
clang abort while analyzing the following (valid) code.
---------- analyze.m
@interface NSObject {}
@property int locked;
@property(nonatomic, readonly) NSObject *media;
@end
void setPlaceholder(NSObject *placeholder) {
placeholder.media.locked = placeholder ? 1 : 0;
}
-------------
% clang --version
clang version 2.9 (trunk 124655)
Target: x86_64-apple-darwin10
% clang --analyze analyze.m
Assertion failed: (isa<BinaryOperator>(cast<StmtPoint>(C.getPredecessor()
->getLocation()).getStmt())), function PostVisitBinaryOperator, file
/Volumes/MacPro/Projects/OpenSource/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp,
line 361.
0 clang 0x0000000100ebe0d2 PrintStackTrace(void*) + 34
[…]
6 clang 0x0000000100484fd5 (anonymous
namespace)::IdempotentOperationChecker::PostVisitBinaryOperator(clang::ento::CheckerContext&,
clang::BinaryOperator const*) + 149
7 clang 0x0000000100483cc4 clang::ento::CheckerVisitor<(anonymous
namespace)::IdempotentOperationChecker>::_PostVisit(clang::ento::CheckerContext&,
clang::Stmt const*) + 100
8 clang 0x000000010046d2a7
clang::ento::ExprEngine::CheckerVisit(clang::Stmt const*,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet&,
clang::ento::ExprEngine::CallbackKind) + 1399
9 clang 0x0000000100473c5c
clang::ento::ExprEngine::VisitBinaryOperator(clang::BinaryOperator const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 3980
[…]
1. <eof> parser at end of file
2. analyze.m:8:3: Error evaluating statement
3. analyze.m:8:3: Error evaluating statement
Some tests show that this assertion is reached only if both
"-analyzer-check-objc-mem" and "-analyzer-check-idempotent-operations" are
passed to the analyzer.
--
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