Skip to content
  1. Nov 15, 2012
  2. Nov 13, 2012
  3. Nov 02, 2012
  4. Nov 01, 2012
  5. Oct 29, 2012
  6. Sep 22, 2012
  7. Sep 20, 2012
  8. Sep 17, 2012
  9. Sep 13, 2012
  10. Sep 08, 2012
    • Ted Kremenek's avatar
      Remove ProgramState::getSymVal(). It was being misused by Checkers, · 244e1d7d
      Ted Kremenek authored
      with at least one subtle bug in MacOSXKeyChainAPIChecker where the
      calling the method was a substitute for assuming a symbolic value
      was null (which is not the case).
      
      We still keep ConstraintManager::getSymVal(), but we use that as
      an optimization in SValBuilder and ProgramState::getSVal() to
      constant-fold SVals.  This is only if the ConstraintManager can
      provide us with that information, which is no longer a requirement.
      As part of this, introduce a default implementation of
      ConstraintManager::getSymVal() which returns null.
      
      For Checkers, introduce ConstraintManager::isNull(), which queries
      the state to see if the symbolic value is constrained to be a null
      value.  It does this without assuming it has been implicitly constant
      folded.
      
      llvm-svn: 163428
      244e1d7d
  11. Aug 24, 2012
  12. Aug 22, 2012
  13. Aug 09, 2012
    • Anna Zaks's avatar
      [analyzer] Cleanup of malloc checker. · 23a62018
      Anna Zaks authored
      Remove Escaped state, which is not really necessary. We can just stop
      tracking the symbol instead of keeping it around and marking escaped.
      
      llvm-svn: 161557
      23a62018
  14. Aug 08, 2012
    • Jordan Rose's avatar
      [analyzer] Clean up the printing of FieldRegions for leaks. · d86b3bdb
      Jordan Rose authored
      Unfortunately, generalized region printing is very difficult:
      - ElementRegions are used both for casting and as actual elements.
      - Accessing values through a pointer means going through an intermediate
        SymbolRegionValue; symbolic regions are untyped.
      - Referring to implicitly-defined variables like 'this' and 'self' could be
        very confusing if they come from another stack frame.
      
      We fall back to simply not printing the region name if we can't be sure it
      will print well. This will allow us to improve in the future.
      
      llvm-svn: 161512
      d86b3bdb
    • Jordan Rose's avatar
      [analyzer] Track malloc'd regions stored in structs. · 356279ca
      Jordan Rose authored
      The main blocker on this (besides the previous commit) was that
      ScanReachableSymbols was not looking through LazyCompoundVals.
      Once that was fixed, it's easy enough to clear out malloc data on return,
      just like we do when we bind to a global region.
      
      <rdar://problem/10872635>
      
      llvm-svn: 161511
      356279ca
  15. Aug 04, 2012
  16. Aug 03, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc: track non-allocated but freed memory · 52242a66
      Anna Zaks authored
      There is no reason why we should not track the memory which was not
      allocated in the current function, but was freed there. This would
      allow to catch more use-after-free and double free with no/limited IPA.
      
      Also fix a realloc issue which surfaced as the result of this patch.
      
      llvm-svn: 161248
      52242a66
  17. Jul 26, 2012
  18. Jul 11, 2012
  19. Jul 02, 2012
    • Jordan Rose's avatar
      [analyzer] Finish replacing ObjCMessage with ObjCMethodDecl and friends. · 547060b3
      Jordan Rose authored
      The preObjCMessage and postObjCMessage callbacks now take an ObjCMethodCall
      argument, which can represent an explicit message send (ObjCMessageSend) or an
      implicit message generated by a property access (ObjCPropertyAccess).
      
      llvm-svn: 159559
      547060b3
    • Jordan Rose's avatar
      [analyzer] Begin replacing ObjCMessage with ObjCMethodCall and friends. · 6bad4905
      Jordan Rose authored
      Previously, the CallEvent subclass ObjCMessageInvocation was just a wrapper
      around the existing ObjCMessage abstraction (over message sends and property
      accesses). Now, we have abstract CallEvent ObjCMethodCall with subclasses
      ObjCMessageSend and ObjCPropertyAccess.
      
      In addition to removing yet another wrapper object, this should make it easy
      to add a ObjCSubscriptAccess call event soon.
      
      llvm-svn: 159558
      6bad4905
    • Jordan Rose's avatar
      [analyzer] Move the last bits of CallOrObjCMessage over to CallEvent. · 7ab0182e
      Jordan Rose authored
      This involved refactoring some common pointer-escapes code onto CallEvent,
      then having MallocChecker use those callbacks for whether or not to consider
      a pointer's /ownership/ as escaping. This still needs to be pinned down, and
      probably we want to make the new argumentsMayEscape() function a little more
      discerning (content invalidation vs. ownership/metadata invalidation), but
      this is a good improvement.
      
      As a bonus, also remove CallOrObjCMessage from the source completely.
      
      llvm-svn: 159557
      7ab0182e
    • Jordan Rose's avatar
      [analyzer] Add a new abstraction over all types of calls: CallEvent · 742920c8
      Jordan Rose authored
      This is intended to replace CallOrObjCMessage, and is eventually intended to be
      used for anything that cares more about /what/ is being called than /how/ it's
      being called. For example, inlining destructors should be the same as inlining
      blocks, and checking __attribute__((nonnull)) should apply to the allocator
      calls generated by operator new.
      
      llvm-svn: 159554
      742920c8
  20. Jun 25, 2012
  21. Jun 23, 2012
  22. Jun 22, 2012
  23. Jun 21, 2012
  24. Jun 20, 2012
  25. Jun 19, 2012
  26. Jun 16, 2012
    • Jordan Rose's avatar
      [analyzer] Buffers passed to CGBitmapContextCreate can escape. · de409b6d
      Jordan Rose authored
      Specifically, although the bitmap context does not take ownership of the
      buffer (unlike CGBitmapContextCreateWithData), the data buffer can be extracted
      out of the created CGContextRef. Thus the buffer is not leaked even if its
      original pointer goes out of scope, as long as
      - the context escapes, or
      - it is retrieved via CGBitmapContextGetData and freed.
      
      Actually implementing that logic is beyond the current scope of MallocChecker,
      so for now CGBitmapContextCreate goes on our system function exception list.
      
      llvm-svn: 158579
      de409b6d
  27. Jun 07, 2012
    • Anna Zaks's avatar
      [analyzer] Anti-aliasing: different heap allocations do not alias · 3563fde6
      Anna Zaks authored
      Add a concept of symbolic memory region belonging to heap memory space.
      When comparing symbolic regions allocated on the heap, assume that they
      do not alias. 
      
      Use symbolic heap region to suppress a common false positive pattern in
      the malloc checker, in code that relies on malloc not returning the
      memory aliased to other malloc allocations, stack.
      
      llvm-svn: 158136
      3563fde6
  28. Jun 02, 2012
  29. May 19, 2012
  30. May 18, 2012
Loading