Skip to content
  1. Oct 25, 2011
    • Anna Zaks's avatar
      [analyzer] Simplify CheckerContext · b473816b
      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
      b473816b
  2. Oct 14, 2011
  3. Oct 11, 2011
  4. Oct 04, 2011
  5. Aug 28, 2011
    • Jordy Rose's avatar
      [analyzer] Change the check::RegionChanges callback to include the regions... · 1fad6631
      Jordy Rose authored
      [analyzer] Change the check::RegionChanges callback to include the regions explicitly requested for invalidation.
      
      Also, allow CallOrObjCMessage to wrap a CXXConstructExpr as well.
      
      Finally, this allows us to remove the clunky whitelisting system from CFRefCount/RetainReleaseChecker. Slight regression due to CXXNewExprs not yet being handled in post-statement callbacks (PR forthcoming).
      
      llvm-svn: 138716
      1fad6631
  6. Aug 20, 2011
    • Anna Zaks's avatar
      Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API... · f86615ca
      Anna Zaks authored
      Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*).
      
      1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well.
      
      2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor.
      
      3) Modify all the checkers to use the new API.
      
      llvm-svn: 138126
      f86615ca
  7. Aug 18, 2011
    • Anna Zaks's avatar
      Remove EnhancedBugReport and RangedBugReport - pull all the extra... · 3a6bdf8f
      Anna Zaks authored
      Remove EnhancedBugReport and RangedBugReport - pull all the extra functionality they provided into their parent BugReport. The only functional changes are: made getRanges() non const - it adds default range to Ranges if none are supplied, made getStmt() private, which was another FIXME.
      
      llvm-svn: 137894
      3a6bdf8f
  8. Aug 16, 2011
  9. Aug 13, 2011
  10. Aug 12, 2011
  11. Jul 23, 2011
  12. Jun 20, 2011
  13. Jun 16, 2011
  14. Jun 15, 2011
    • Jordy Rose's avatar
      [analyzer] Revise CStringChecker's modelling of strcpy() and strcat(): · 634c12d2
      Jordy Rose authored
      - (bounded copies) Be more conservative about how much is being copied.
      - (str(n)cat) If we can't compute the exact final length of an append operation, we can still lower-bound it.
      - (stpcpy) Fix the conjured return value at the end to actually be returned.
      
      This requires these supporting changes:
      - C string metadata symbols are still live even when buried in a SymExpr.
      - "Hypothetical" C string lengths, to represent a value that /will/ be passed to setCStringLength() if all goes well. (The idea is to allow for temporary constrainable symbols that may end up becoming permanent.)
      - The 'checkAdditionOverflow' helper makes sure that the two strings being appended in a strcat don't overflow size_t. This should never *actually* happen; the real effect is to keep the final string length from "wrapping around" in the constraint manager.
      
      This doesn't actually test the "bounded" operations (strncpy and strncat) because they can leave strings unterminated. Next on the list!
      
      llvm-svn: 133046
      634c12d2
    • Jordy Rose's avatar
      [analyzer] If a C string length is UnknownVal, clear any existing length... · 0e9fb28e
      Jordy Rose authored
      [analyzer] If a C string length is UnknownVal, clear any existing length binding. No tests yet because the only thing that sets string length is strcpy(), and that needs some work anyway.
      
      llvm-svn: 133044
      0e9fb28e
  15. Jun 14, 2011
  16. Jun 04, 2011
  17. May 03, 2011
  18. May 02, 2011
  19. Apr 28, 2011
  20. Apr 26, 2011
  21. Apr 15, 2011
  22. Apr 12, 2011
  23. Apr 09, 2011
    • Lenny Maiorani's avatar
      strcat() and strncat() model additions to CStringChecker. · 467dbd5f
      Lenny Maiorani authored
      Validates inputs are not NULL, checks for overlapping strings, concatenates the strings checking for buffer overflow, sets the length of the destination string to the sum of the s1 length and the s2 length, binds the return value to the s1 value.
      
      llvm-svn: 129215
      467dbd5f
  24. Mar 31, 2011
    • Lenny Maiorani's avatar
      Adding Static Analyzer checker for mempcpy(). · 79d74141
      Lenny Maiorani authored
      Models mempcpy() so that if length is NULL the destination pointer is returned. Otherwise, the source and destination are confirmed not to be NULL and not overlapping. Finally the copy is validated to not cause a buffer overrun and the return value is bound to the address of the byte after the last byte copied.
      
      llvm-svn: 128677
      79d74141
Loading