Skip to content
  1. Mar 03, 2012
  2. Mar 02, 2012
  3. Mar 01, 2012
  4. Feb 29, 2012
  5. Feb 28, 2012
  6. Feb 27, 2012
  7. Feb 25, 2012
    • Ted Kremenek's avatar
      RetainCountChecker: don't adjust the retain count when analyzing a ReturnStmt... · ef31f376
      Ted Kremenek authored
      RetainCountChecker: don't adjust the retain count when analyzing a ReturnStmt unless we are in the top-level call frame.  We can do more later, but this makes the checker self-consistent (and fixes a crash).
      
      llvm-svn: 151426
      ef31f376
    • Anna Zaks's avatar
      [analyzer] Malloc: reason about the ObjC messages and C++. · 7ac344a4
      Anna Zaks authored
      Assume none of the ObjC messages defined in system headers free memory,
      except for the ones containing 'freeWhenDone' selector. Currently, just
      assume that the region escapes to the messages with 'freeWhenDone'
      (ideally, we want to treat it as 'free()').
      
      For now, always assume that regions escape when passed to C++ methods.
      
      llvm-svn: 151410
      7ac344a4
  8. Feb 24, 2012
  9. Feb 23, 2012
    • Anna Zaks's avatar
      [analyzer] KeyChainAPI: unique the leaks by allocation site. · 4b062cb9
      Anna Zaks authored
      (Very similar to the previous change in malloc.)
      
      llvm-svn: 151297
      4b062cb9
    • 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
  10. Feb 22, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc cleanup: · 40a7eb38
      Anna Zaks authored
       - We should not evaluate strdup in the Malloc Checker, it's the job of
      CString checker, so just update the RefState to reflect allocated
      memory.
      
      - Refactor to reduce LOC: remove some wrapper auxiliary functions, make
      all functions return the state and add the transition in one place
      (instead of in each auxiliary function).
      
      llvm-svn: 151188
      40a7eb38
    • Douglas Gregor's avatar
      Generate an AST for the conversion from a lambda closure type to a · ed90df38
      Douglas Gregor authored
      block pointer that returns a block literal which captures (by copy)
      the lambda closure itself. Some aspects of the block literal are left
      unspecified, namely the capture variable (which doesn't actually
      exist) and the body (which will be filled in by IRgen because it can't
      be written as an AST).
      
      Because we're switching to this model, this patch also eliminates
      tracking the copy-initialization expression for the block capture of
      the conversion function, since that information is now embedded in the
      synthesized block literal. -1 side tables FTW.
      
      llvm-svn: 151131
      ed90df38
    • Anna Zaks's avatar
      [analyzer] Malloc checker: mark 'strdup' and 'strndup' as allocators. · 199e8e58
      Anna Zaks authored
      llvm-svn: 151124
      199e8e58
Loading