- Dec 07, 2011
-
-
Anna Zaks authored
llvm-svn: 145984
-
- Dec 05, 2011
- 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
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 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
-
- Nov 16, 2011
-
-
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
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
-
- 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 05, 2011
-
-
Anna Zaks authored
llvm-svn: 143787
-
- Nov 01, 2011
-
-
Anna Zaks authored
Remove unnecessary calls to CheckerContext::getPredecessor() + Comments. llvm-svn: 143513
-
- Oct 28, 2011
-
-
Ted Kremenek authored
[analyzer] ObjC message sends to nil receivers that return structs are now okay (compiler zeroes out the data). Fixes <rdar://problem/9151319>. llvm-svn: 143215
-
- Oct 26, 2011
-
-
Anna Zaks authored
CheckerContext::getPredecessor is only used to get to the LocationContext half of the times. llvm-svn: 143061
-
Anna Zaks authored
The path sensitive checkers should use EmitBasicReport, which provides the node information. llvm-svn: 143060
-
Anna Zaks authored
Also document addTransition methods. llvm-svn: 143059
-
- Oct 25, 2011
-
-
Anna Zaks authored
A step toward making sure that diagnostics report should only be generated though the CheckerContext and not though BugReporter or ExprEngine directly. llvm-svn: 142947
-
Anna Zaks authored
Remove dead members/parameters: ProgramState, respondsToCallback, autoTransition. Remove addTransition method since it's the same as generateNode. Maybe we should rename generateNode to genTransition (since a transition is always automatically generated)? llvm-svn: 142946
-
Anna Zaks authored
Now, all the path sensitive checkers use CheckerContext! llvm-svn: 142944
-
Anna Zaks authored
Get rid of the EndOfPathBuilder completely. Use the generic NodeBuilder to generate nodes. Enqueue the end of path frontier explicitly. llvm-svn: 142943
-
Ted Kremenek authored
llvm-svn: 142885
-
- Oct 24, 2011
-
-
Anna Zaks authored
Renamed PureNodeBuilder->StmtNodeBuilder. llvm-svn: 142849
-
Anna Zaks authored
- OSAtomicChecker - ExprEngine::processStmt llvm-svn: 142846
-
Ted Kremenek authored
Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses. llvm-svn: 142782
-
- Oct 19, 2011
-
-
Anna Zaks authored
NodeBuilder should not assume it's dealing with a single predecessor. Remove predecessor getters. Modify the BranchNodeBuilder to not be responsible for doing auto-transitions (which depend on a predecessor). llvm-svn: 142453
-
Anna Zaks authored
ExprEngineBuilders is not used. llvm-svn: 142450
-
Anna Zaks authored
Take advantage of the new builders for branch processing. As part of this change pass generic NodeBuilder (instead of BranchNodeBuilder) to the BranchCondition callback and remove the unused methods form BranchBuilder. llvm-svn: 142448
-
Anna Zaks authored
llvm-svn: 142444
-
Anna Zaks authored
[analyzer] Node Builder refactoring: Introduce a simple Node Builder responsible for generating the node frontier. Currently we have a bunch of different node builders which provide some common functionality but are difficult to refactor. Each builder generates nodes of different kinds and calculates the frontier nodes, which should be propagated to the next step (after the builder dies). Introduce a new NodeBuilder which provides very basic node generation facilities but takes care of the second problem. The idea is that all the other builders will eventually use it. Use this builder in CheckerContext instead of StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder is a hack and will be removed later on). llvm-svn: 142443
-
- Oct 14, 2011
-
-
Benjamin Kramer authored
Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
-
- Oct 11, 2011
-
-
Anna Zaks authored
llvm-svn: 141678
-
Anna Zaks authored
[analyzer] Warn about the use of insecure, deprecated vfork() function PR11053 (http://llvm.org/bugs/show_bug.cgi?id=11053). A patch by Graham Lee! llvm-svn: 141643
-
- Oct 10, 2011
-
-
Richard Smith authored
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. llvm-svn: 141561
-