- Aug 16, 2011
-
-
Ted Kremenek authored
llvm-svn: 137665
-
- Aug 15, 2011
-
-
Anna Zaks authored
MacOSKeychainAPIChecker: Use llvm::SmallString instead of std::string (as per code review for r137523). llvm-svn: 137633
-
- Aug 13, 2011
-
-
Ted Kremenek authored
Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at. llvm-svn: 137537
-
Ted Kremenek authored
Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior. For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner. llvm-svn: 137529
-
Anna Zaks authored
MacOSKeychainAPIChecker: If the allocated data address entered as an enclosing function parameter, skip it to avoid false positives. llvm-svn: 137526
-
- Aug 12, 2011
-
-
Anna Zaks authored
Report errors earlier: on checkDeadSymbols() and clear the state after the symbol we are tracking goes out of scope. Also, perform lazy error checking. Instead of forcing the paths to be split depending one the return value of the allocator, make the return symbol depend on the allocated data symbol, which prolongs its life span to the time when the allocated data symbol becomes dead. llvm-svn: 137523
-
Jordy Rose authored
time. One is cleanup, the other is me being OCD about enum group nesting. llvm-svn: 137517
-
Anna Zaks authored
MacOSKeychainAPIChecker: There is no need to use SymbolMetadata to represent the allocated data symbol, we can just use the symbol corresponding to the SymbolicRegion. This simplifies tracking of the symbol, for example, SymbolMetadata needs to go through extra hoops to stay alive. Make AllocationState internal to the MacOSKeychainAPIChecker class. llvm-svn: 137514
-
Ted Kremenek authored
[analyzer] Introduce new MemRegion, "TypedValueRegion", so that we can separate TypedRegions that implement getValueType() from those that don't. Patch by Olaf Krzikalla! llvm-svn: 137498
-
- Aug 06, 2011
-
-
Anna Zaks authored
KeychainAPI checker: Track SymbolMetadata instead of MemRegion in checker state so that we could clear the state on evalDeadSymbols; also track the return value. llvm-svn: 137003
-
- Aug 05, 2011
-
-
Anna Zaks authored
KeychainAPI checker: Generate an error on double allocation. Pull out getAsPointeeMemoryRegion so that it could be reused. llvm-svn: 136952
-
- Aug 04, 2011
-
-
Anna Zaks authored
KeychainAPI checker: Track additional pair of SecKeychain APIs. Also, keep exploring the transition on which a call to allocator function failed (to be able to find errors in examples like ErrorCodesFromDifferentAPISDoNotInterfere). llvm-svn: 136930
-
Anna Zaks authored
KeychainAPI checker: Refactor to make it easier to add more allocator/deallocator API pairs. Add the allocator function ID to the checker state. Better comments. llvm-svn: 136889
-
Anna Zaks authored
llvm-svn: 136852
-
Anna Zaks authored
KeychainAPI checker: Add basic diagnostics. Track MemoryRegion istead of SymbolicRef since the address might not be a symbolic value in some cases, for example in fooOnlyFree() test. llvm-svn: 136851
-
Ted Kremenek authored
llvm-svn: 136849
-
Ted Kremenek authored
[analyzer] rename all experimental checker packages to have 'experimental' be the common root package. llvm-svn: 136835
-
- Aug 03, 2011
-
-
Ted Kremenek authored
[analyzer] Introduce MallocOverflowSecurityChecker, a simple flow-sensitive checker that may be useful for security auditing. This checker is currently too noisy to be on by default. llvm-svn: 136804
-
- Aug 02, 2011
-
-
Anna Zaks authored
KeychainAPI checker: only check the paths on which the allocator function returned noErr. (+ minor cleanup) llvm-svn: 136694
-
Anna Zaks authored
Add a skeleton for the Keychain Services API Checker. Register it as OSX experimental for now. Note, the checker still does not handle tracking of escaped values, taking into account the return value of the allocator functions, nor the actual bug reporting.. llvm-svn: 136659
-
- Jul 31, 2011
-
-
Benjamin Kramer authored
llvm-svn: 136581
-
- Jul 29, 2011
-
-
Ted Kremenek authored
[analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs. The motivation of this large change is to drastically simplify the logic in ExprEngine going forward. Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings will be called frequently; this can also be improved over time. llvm-svn: 136419
-
Ted Kremenek authored
[analyzer] fix bug in malloc checker where the tracked symbol would not properly be removed from the state. llvm-svn: 136418
-
- Jul 25, 2011
-
-
Chandler Carruth authored
SourceManager and FullSourceLoc. llvm-svn: 135969
-
- Jul 23, 2011
-
-
Chris Lattner authored
them into the clang namespace. llvm-svn: 135852
-
- Jul 19, 2011
-
-
Jordy Rose authored
llvm-svn: 135518
-
Jordy Rose authored
pthread and XNU locks. Patch by Rui Paulo! llvm-svn: 135515
-
- Jul 16, 2011
-
-
Ted Kremenek authored
[analyzer] Place checking for Core Foundation "Create" rule into a proper API. No functionality change. llvm-svn: 135349
-
- Jul 15, 2011
-
-
Jordy Rose authored
Clean up UnixAPIChecker, including switching its array of BugTypes to llvm::OwningPtr<BugType> vars (the new convention). No functionality change. llvm-svn: 135255
-
Jordy Rose authored
Clean up MacOSXAPIChecker, including switching its array of BugTypes to a single llvm::OwningPtr<BugType> (the new convention). No functionality change. llvm-svn: 135250
-
- Jul 02, 2011
-
-
Eric Christopher authored
Fixes rdar://9714064 llvm-svn: 134292
-
- Jun 21, 2011
-
-
Douglas Gregor authored
MaterializeTemporaryExpr captures a reference binding to a temporary value, making explicit that the temporary value (a prvalue) needs to be materialized into memory so that its address can be used. The intended AST invariant here is that a reference will always bind to a glvalue, and MaterializeTemporaryExpr will be used to convert prvalues into glvalues for that binding to happen. For example, given const int& r = 1.0; The initializer of "r" will be a MaterializeTemporaryExpr whose subexpression is an implicit conversion from the double literal "1.0" to an integer value. IR generation benefits most from this new node, since it was previously guessing (badly) when to materialize temporaries for the purposes of reference binding. There are likely more refactoring and cleanups we could perform there, but the introduction of MaterializeTemporaryExpr fixes PR9565, a case where IR generation would effectively bind a const reference directly to a bitfield in a struct. Addresses <rdar://problem/9552231>. llvm-svn: 133521
-
- Jun 20, 2011
-
-
Jordy Rose authored
llvm-svn: 133472
-
Jordy Rose authored
llvm-svn: 133410
-
Jordy Rose authored
[analyzer] Re-enable checking for strncpy, along with a new validation of the size argument. strncat is not yet up-to-date, but I'm leaving it enabled for now (there shouldn't be any false positives, at least...) llvm-svn: 133408
-
Jordy Rose authored
[analyzer] Eliminate "byte string function" from CStringChecker's diagnostics, and make it easier to provide custom messages for overflow checking, in preparation for re-enabling strncpy checking. llvm-svn: 133406
-
- Jun 16, 2011
-
-
Jordy Rose authored
[analyzer] Clean up modeling of strcmp, including cases where a string literal has an embedded null character, and where both arguments are the same buffer. Also use nested ifs rather than early returns; in this case early returns will lose any assumptions we've made earlier in the function. llvm-svn: 133154
-
Jordy Rose authored
I will not commit without building first. I will not commit without building first. I will not commit without building first... llvm-svn: 133150
-
Jordy Rose authored
[analyzer] Cleanup: mainly 80-char violations and preferring SValBuilder::getComparisonType() to just referencing IntTy. llvm-svn: 133149
-
John McCall authored
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
-