1. 12 Jun, 2013 1 commit
  2. 07 Jun, 2013 1 commit
  3. 31 May, 2013 2 commits
    • Mutex init can fail · 1a42dd17
      It is obviously quite a serious problem if this happens, but mutex
      initialization can fail and we should detect it.  It's a bit like
      a memory allocation failure, in that you're probably pretty screwed
      if this occurs, but at least we'll catch it.
      Russell Belfer committed
    • Zero memory for major objects before freeing · f658dc43
      By zeroing out the memory when we free larger objects (i.e. those
      that serve as collections of other data, such as repos, odb, refdb),
      I'm hoping that it will be easier for libgit2 bindings to find
      errors in their object management code.
      Russell Belfer committed
  4. 24 May, 2013 1 commit
  5. 25 Apr, 2013 1 commit
  6. 24 Apr, 2013 1 commit
  7. 23 Apr, 2013 1 commit
  8. 22 Apr, 2013 13 commits
  9. 08 Jan, 2013 1 commit
  10. 09 Dec, 2012 2 commits
  11. 09 Nov, 2012 1 commit
  12. 11 Sep, 2012 1 commit
    • cache: fix race condition · 6ee68611
      Example: a cached node is owned only by the cache (refcount == 1).
      Thread A holds the lock and determines that the entry which should get
      cached equals the node (git_oid_cmp(&node->oid, &entry->oid) == 0).
      It frees the given entry to instead return the cached node to the user
      (entry = node). Now, before Thread A happens to increment the refcount
      of the node *outside* the cache lock, Thread B tries to store another
      entry and hits the slot of the node before, decrements its refcount and
      frees it *before* Thread A gets a chance to increment for the user.
      
      	git_cached_obj_incref(entry);
      
      	git_mutex_lock(&cache->lock);
      	{
      		git_cached_obj *node = cache->nodes[hash & cache->size_mask];
      
      		if (node == NULL) {
      			cache->nodes[hash & cache->size_mask] = entry;
      		} else if (git_oid_cmp(&node->oid, &entry->oid) == 0) {
      			git_cached_obj_decref(entry, cache->free_obj);
      			entry = node;
      		} else {
      			git_cached_obj_decref(node, cache->free_obj);
      
      // Thread B is here
      
      			cache->nodes[hash & cache->size_mask] = entry;
      		}
      	}
      	git_mutex_unlock(&cache->lock);
      
      // Thread A is here
      
      	/* increase the refcount again, because we are
      	 * returning it to the user */
      	git_cached_obj_incref(entry);
      Michael Schubert committed
  13. 09 Aug, 2012 1 commit
  14. 07 Jun, 2012 1 commit
  15. 25 Apr, 2012 1 commit
  16. 16 Mar, 2012 1 commit
  17. 13 Feb, 2012 1 commit
  18. 28 Jan, 2012 1 commit
  19. 29 Oct, 2011 1 commit
  20. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      1. The license header is technically not valid if it doesn't have a
      copyright signature.
      
      2. The COPYING file has been updated with the different licenses used in
      the project.
      
      3. The full GPLv2 header in each file annoys me.
      Vicent Marti committed
  21. 30 Aug, 2011 1 commit
  22. 16 May, 2011 2 commits
    • cache: Drop cuckoo hashing · 335d6c99
      Now we use a simple closed-addressing cache. Cuckoo hashing was creating
      too many issues with race conditions. Fuck that.
      
      Let's see what happens performance wise, we may have to roll back or
      come up with another way to implement an efficient multi-threaded cache.
      Vicent Marti committed
    • cache: Fix deadlock · 3de79280
      Do not try to adquire the same node lock twice when the cuckoo hashing
      resolves to the same node.
      Vicent Marti committed
  23. 15 May, 2011 2 commits
  24. 14 May, 2011 1 commit