- Dec 05, 2011
-
-
Anna Zaks authored
llvm-svn: 145827
-
- Dec 01, 2011
-
-
radar://10508828Anna Zaks authored
We trigger an error if free is called after a possibly failed allocation. Do not trigger the error if we know that the buffer is not null. llvm-svn: 145584
-
Anna Zaks authored
We are getting name of the called function or it's declaration in a few checkers. Refactor them to use the helper function in the CheckerContext. llvm-svn: 145576
-
Ted Kremenek authored
When analyzing a C++ method (without a specific caller), assume 'this' is non-null. Fixes <rdar://problem/10508787>. llvm-svn: 145575
-
Ted Kremenek authored
explicit template specializations (which represent actual functions somebody wrote). Along the way, refactor some other code which similarly cares about whether or not they are looking at a template instantiation. llvm-svn: 145547
-
- Nov 30, 2011
-
-
Benjamin Kramer authored
llvm-svn: 145506
-
Anna Zaks authored
llvm-svn: 145495
-
- Nov 29, 2011
-
-
Ted Kremenek authored
Relax RegionStore to allow loads from CodeTextRegions. Apparently you can actually write code that does this. This seems worthy of a checker, but the StoreManager should handle the memory abstraction without crashing. Fixes PR 11450. llvm-svn: 145424
-
- Nov 28, 2011
-
-
Anna Zaks authored
llvm-svn: 145274
-
- Nov 18, 2011
-
-
Anna Zaks authored
There is an open radar to implement better scanf checking as a Sema warning. However, a bit of redundancy is fine in this case. llvm-svn: 144964
-
Anna Zaks authored
When the solver and SValBuilder cannot reason about symbolic expressions (ex: (x+1)*y ), the analyzer conjures a new symbol with no ties to the past. This helps it to recover some path-sensitivity. However, this breaks the taint propagation. With this commit, we are going to construct the expression even if we cannot reason about it later on if an operand is tainted. Also added some comments and asserts. llvm-svn: 144932
-
- Nov 17, 2011
- Nov 16, 2011
-
-
Jim Goodnow II authored
Manager. Added test to ensure proper binding of initialized values. This patch fixes PR11249. llvm-svn: 144831
-
Benjamin Kramer authored
llvm-svn: 144829
-
Anna Zaks authored
Change the ArrayBoundCheckerV2 to be more aggressive in reporting buffer overflows when the offset is tainted. Previously, we did not report bugs when the state was underconstrained (not enough information about the bound to determine if there is an overflow) to avoid false positives. However, if we know that the buffer offset is tainted - comes in from the user space and can be anything, we should report it as a bug. + The very first example of us catching a taint related bug. This is the only example we can currently handle. More to come... llvm-svn: 144826
-
Anna Zaks authored
The checker is responsible for defining attack surface and adding taint to symbols. llvm-svn: 144825
-
Anna Zaks authored
TaintTag.h will contain definitions of different taint kinds and their properties. TaintManager will be responsible for implementing taint specific operations, storing taint. ProgramState will provide API to add/remove taint. llvm-svn: 144824
-
Anna Zaks authored
llvm-svn: 144823
-
Anna Zaks authored
many checkers are trying to get a name of the callee when visiting a CallExpr, so provide a convenience API. llvm-svn: 144820
-
- Nov 14, 2011
-
-
Ted Kremenek authored
[static analyzer] Tweak RetainCountChecker's diagnostics to correctly indicate if a message was due to a property access. This can potentially be refactored for other clients, and this is a regression from the refactoring of property acceses. llvm-svn: 144571
-
Ted Kremenek authored
[analyzer;Regionstore] handle loads from StringLiteral elements for StringLiterals representing wide strings. Fixes PR 11294. llvm-svn: 144563
-
- Nov 11, 2011
-
-
Ted Kremenek authored
[static analyzer] be more specific when running removeDeadBindings. Instead of seeing if the predecessor node was a non-StmtPoint, check if it is specifically a BlockEntrance node. llvm-svn: 144340
-
Ted Kremenek authored
[static analyzer]: only call RemoveDeadBindings() when analyzing non-Expr stmts, entering a basic block, or analyzing non-consumed expressions. This sigificantly speeds up analysis time, and reduces analysis time down to 27% less than before we linearized the CFG. llvm-svn: 144332
-
- Nov 10, 2011
-
-
Richard Smith authored
literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. llvm-svn: 144265
-
- Nov 08, 2011
-
-
Anna Zaks authored
Analysis by Ted: " if (stateZero && !stateNotZero) { is checking to see if: (A) "it is possible for the value to be zero" (stateZero) AND (B) "it is not possible for the value to be non-zero" (!stateNotZero) That said, the only way for both B to be true AND A to be false is if the path is completely infeasible by the time we reach the divide-by-zero check. For the most part (all cases?), such cases should automatically get pruned out at branches (i.e., an infeasible path gets dropped), which is the case in our tests. So the question is whether or not such an infeasible path might not get dropped earlier? I can't envision any right now. Indeed, the rest of the checker assumes that if the bug condition didn't fire then 'stateNotZero' is non-NULL: C.addTransition(stateNotZero); " llvm-svn: 144114
-
- Nov 07, 2011
-
-
John McCall authored
llvm-svn: 143910
-
- Nov 06, 2011
-
-
John McCall authored
property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. llvm-svn: 143867
-
- Nov 05, 2011
-
-
Anna Zaks authored
llvm-svn: 143787
-
- Nov 04, 2011
-
-
Benjamin Kramer authored
llvm-svn: 143696
-
- Nov 02, 2011
-
-
Douglas Gregor authored
Ahmed Charles! llvm-svn: 143569
-
Benjamin Kramer authored
llvm-svn: 143538
-
- Nov 01, 2011
-
-
Anna Zaks authored
This prevents caching out on nodes with different sink flag. (This is a cleaner fix for radar://10376675). llvm-svn: 143517
-
Anna Zaks authored
This is another fallout from the refactoring. We were calling MarkAsSink on a cached out node. (Fixes radar://10376675) llvm-svn: 143516
-
Anna Zaks authored
The parent and child builders should not share node sets. llvm-svn: 143515
-
Anna Zaks authored
This fixes radar://10367606 llvm-svn: 143514
-
Anna Zaks authored
Remove unnecessary calls to CheckerContext::getPredecessor() + Comments. llvm-svn: 143513
-
Anna Zaks authored
llvm-svn: 143512
-