1. 29 Jun, 2016 1 commit
    • blame: do not decrement commit refcount in make_origin · 21766702
      When we create a blame origin, we try to look up the blob that is
      to be blamed at a certain revision. When this lookup fails, e.g.
      because the file did not exist at that certain revision, we fail
      to create the blame origin and return `NULL`. The blame origin
      that we have just allocated is thereby free'd with
      `origin_decref`.
      
      The `origin_decref` function does not only decrement reference
      counts for the blame origin, though, but also for its commit and
      blob. When this is done in the error case, we will cause an
      uneven reference count for these objects. This may result in
      hard-to-debug failures at seemingly unrelated code paths, where
      we try to access these objects when they in fact have already
      been free'd.
      
      Fix the issue by refactoring `make_origin` such that we only
      allocate the object after the only function that may fail so that
      we do not have to call `origin_decref` at all. Also fix the
      `pass_blame` function, which indirectly calls `make_origin`, to
      free the commit when `make_origin` failed.
      Patrick Steinhardt committed
  2. 26 Jun, 2016 7 commits
  3. 21 Jun, 2016 6 commits
  4. 20 Jun, 2016 16 commits
  5. 19 Jun, 2016 1 commit
  6. 17 Jun, 2016 1 commit
  7. 16 Jun, 2016 1 commit
  8. 15 Jun, 2016 2 commits
  9. 14 Jun, 2016 4 commits
  10. 07 Jun, 2016 1 commit