subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1442053 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
Date Mon, 04 Feb 2013 09:31:41 GMT
Author: stefan2
Date: Mon Feb  4 09:31:41 2013
New Revision: 1442053

URL: http://svn.apache.org/viewvc?rev=1442053&view=rev
Log:
Fix a membuffer cache bug introduced in 1.8:  Trying to make room
for the new contents of an existing key / item may remove the old
contents and, thus, the old index entry.  Before manually removing
the entry, we must check whether it still exists.

* subversion/libsvn_subr/cache-membuffer.c
  (membuffer_cache_set_internal): re-do entry lookup before removal

Modified:
    subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1442053&r1=1442052&r2=1442053&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Mon Feb  4 09:31:41 2013
@@ -1430,7 +1430,10 @@ membuffer_cache_set_internal(svn_membuff
   else
     {
       /* if there is already an entry for this key, drop it.
+       * Since ensure_data_insertable may have removed entries from
+       * ENTRY's group, re-do the lookup.
        */
+      entry = find_entry(cache, group_index, to_find, FALSE);
       if (entry)
         drop_entry(cache, entry);
     }



Mime
View raw message