Experimenting with gcc 4.9's -fsantize=undefined I got a warning:

$ svnadmin create repo
$ svn mkdir -mm file://`pwd`/repo/A
../src/subversion/libsvn_fs_fs/transaction.c:1978:14: runtime error: shift 
exponent -1 is negative

The code is

   1976       /* We also don't want the linear deltification to span more shards
   1977          than deltas would be used in the simple skip-delta schme. */
   1978       if ((1 << (--shards)) <= walk)
   1979         count = noderev->predecessor_count - 1;

Perhaps something like this:

Index: subversion/libsvn_fs_fs/transaction.c
===================================================================
--- subversion/libsvn_fs_fs/transaction.c       (revision 1589957)
+++ subversion/libsvn_fs_fs/transaction.c       (working copy)
@@ -1975,7 +1975,7 @@ choose_delta_base(representation_t **rep,
 
       /* We also don't want the linear deltification to span more shards
          than deltas would be used in the simple skip-delta schme. */
-      if ((1 << (--shards)) <= walk)
+      if (shards > 0 && (1 << (--shards)) <= walk)
         count = noderev->predecessor_count - 1;
     }
 
-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Reply via email to