summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* MacOSKeychainAPIChecker: The security API/memory leak checker should always ↵Anna Zaks2011-08-151-10/+17
| | | | | | generate regular nodes instead of sink nodes. llvm-svn: 137681
* Rename GRState to ProgramState, and cleanup some code formatting along the way.Ted Kremenek2011-08-151-15/+15
| | | | llvm-svn: 137665
* MacOSKeychainAPIChecker: Use llvm::SmallString instead of std::string (as ↵Anna Zaks2011-08-151-7/+7
| | | | | | per code review for r137523). llvm-svn: 137633
* MacOSKeychainAPIChecker: If the allocated data address entered as an ↵Anna Zaks2011-08-121-0/+5
| | | | | | enclosing function parameter, skip it to avoid false positives. llvm-svn: 137526
* MacOSKeychainAPIChecker: Anna Zaks2011-08-121-38/+150
| | | | | | | | 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
* MacOSKeychainAPIChecker: There is no need to use SymbolMetadata to represent ↵Anna Zaks2011-08-121-44/+70
| | | | | | | | 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
* KeychainAPI checker: Track SymbolMetadata instead of MemRegion in checker ↵Anna Zaks2011-08-051-15/+33
| | | | | | state so that we could clear the state on evalDeadSymbols; also track the return value. llvm-svn: 137003
* KeychainAPI checker: Generate an error on double allocation. Pull out ↵Anna Zaks2011-08-051-12/+47
| | | | | | getAsPointeeMemoryRegion so that it could be reused. llvm-svn: 136952
* KeychainAPI checker: Track additional pair of SecKeychain APIs. Also, keep ↵Anna Zaks2011-08-041-14/+45
| | | | | | exploring the transition on which a call to allocator function failed (to be able to find errors in examples like ErrorCodesFromDifferentAPISDoNotInterfere). llvm-svn: 136930
* KeychainAPI checker: Refactor to make it easier to add more ↵Anna Zaks2011-08-041-36/+67
| | | | | | allocator/deallocator API pairs. Add the allocator function ID to the checker state. Better comments. llvm-svn: 136889
* KeychainAPI checker: refactor to use early exit.Anna Zaks2011-08-041-50/+52
| | | | llvm-svn: 136852
* KeychainAPI checker: Add basic diagnostics. Track MemoryRegion istead of ↵Anna Zaks2011-08-041-16/+80
| | | | | | SymbolicRef since the address might not be a symbolic value in some cases, for example in fooOnlyFree() test. llvm-svn: 136851
* KeychainAPI checker: only check the paths on which the allocator function ↵Anna Zaks2011-08-021-1/+12
| | | | | | returned noErr. (+ minor cleanup) llvm-svn: 136694
* Add a skeleton for the Keychain Services API Checker. Register it as OSX ↵Anna Zaks2011-08-011-0/+160
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
OpenPOWER on IntegriCloud