Skip to content
  1. Jun 16, 2011
  2. 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
  3. Jun 14, 2011
  4. Jun 04, 2011
  5. May 03, 2011
  6. May 02, 2011
  7. Apr 28, 2011
  8. Apr 26, 2011
  9. Apr 15, 2011
  10. Apr 12, 2011
  11. 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
  12. 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
  13. Mar 01, 2011
  14. Feb 24, 2011
  15. Feb 22, 2011
  16. Feb 17, 2011
  17. Feb 15, 2011
  18. Feb 11, 2011
  19. Feb 10, 2011
  20. Feb 08, 2011
  21. Jan 11, 2011
  22. Dec 23, 2010
  23. Dec 22, 2010
Loading