Skip to content
  1. May 02, 2012
  2. May 01, 2012
  3. Apr 26, 2012
  4. Mar 21, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc: Utter the name of the leaked variable. · fc2e1534
      Anna Zaks authored
      Specifically, we use the last store of the leaked symbol in the leak diagnostic.
      (No support for struct fields since the malloc checker doesn't track those
      yet.)
      
      + Infrastructure to track the regions used in store evaluations.
      This approach is more precise than iterating the store to
      obtain the region bound to the symbol, which is used in RetainCount
      checker. The region corresponds to what is uttered in the code in the
      last store and we do not rely on the store implementation to support
      this functionality.
      
      llvm-svn: 153212
      fc2e1534
  5. Mar 06, 2012
  6. Feb 29, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc: A pointer might escape through CFContainers APIs, · e0c03cab
      Anna Zaks authored
      funopen, setvbuf.
      
      Teach the checker and the engine about these APIs to resolve malloc
      false positives. As I am adding more of these APIs, it is clear that all
      this should be factored out into a separate callback (for example,
      region escapes). Malloc, KeyChainAPI and RetainRelease checkers could
      all use it.
      
      llvm-svn: 151737
      e0c03cab
  7. Feb 23, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc: unique leak reports by allocation site. · df901a44
      Anna Zaks authored
      When we find two leak reports with the same allocation site, report only
      one of them.
      
      Provide a helper method to BugReporter to facilitate this.
      
      llvm-svn: 151287
      df901a44
    • Anna Zaks's avatar
      [analyzer] Invalidate the region passed to pthread_setspecific() call. · 07de9c12
      Anna Zaks authored
      Make this call an exception in ExprEngine::invalidateArguments:
      'int pthread_setspecific(ptheread_key k, const void *)' stores
      a value into thread local storage. The value can later be retrieved
      with 'void *ptheread_getspecific(pthread_key)'. So even thought the
      parameter is 'const void *', the region escapes through the
      call.
      
      (Here we just blacklist the call in the ExprEngine's default
      logic. Another option would be to add a checker which evaluates
      the call and triggers the call to invalidate regions.)
      
      Teach the Malloc Checker, which treats all system calls as safe about
      the API.
      
      llvm-svn: 151220
      07de9c12
  8. Feb 22, 2012
  9. Feb 20, 2012
    • Anna Zaks's avatar
      [analyzer] Turn on by default the Malloc Checker and a couple of CString · 0cdce4df
      Anna Zaks authored
      checks:
      
      - unix.Malloc - Checks for memory leaks, double free, use-after-free.
      - unix.cstring.NullArg - Checks for null pointers passed as arguments to
      CString functions + evaluates CString functions.
      - unix.cstring.BadSizeArg - Checks for common anti-patterns in
      strncat size argument.
      
      llvm-svn: 150988
      0cdce4df
  10. Feb 17, 2012
  11. Feb 16, 2012
  12. Feb 15, 2012
  13. Feb 14, 2012
  14. Feb 13, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc Checker: realloc: correct the way we are handing the · 8fd0f2a6
      Anna Zaks authored
      case when size is 0.
      
      llvm-svn: 150412
      8fd0f2a6
    • Anna Zaks's avatar
      [analyzer] Malloc checker: rework realloc handling: · d56c8794
      Anna Zaks authored
      1) Support the case when realloc fails to reduce False Positives. (We
      essentially need to restore the state of the pointer being reallocated.)
      
      2) Realloc behaves differently under special conditions (from pointer is
      null, size is 0). When detecting these cases, we should consider
      under-constrained states (size might or might not be 0). The
      old version handled this in a very hacky way. The code did not
      differentiate between definite and possible (no consideration for
      under-constrained states). Further, after processing each special case,
      the realloc processing function did not return but chained to the next
      special case processing. So you could end up in an execution in which
      you first see the states in which size is 0 and realloc ~ free(),
      followed by the states corresponding to size is not 0 followed by the
      evaluation of the regular realloc behavior.
      
      llvm-svn: 150402
      d56c8794
  15. Feb 12, 2012
  16. Feb 11, 2012
  17. Feb 10, 2012
  18. Feb 09, 2012
  19. Sep 01, 2011
  20. Aug 04, 2011
  21. Apr 27, 2011
  22. Mar 24, 2011
  23. Feb 28, 2011
Loading