On Fri, May 22, 2015 at 6:25 PM, Roderich Schupp <[email protected]>
wrote:
>
> But I'm not entirely convinced that the bug is really in the construction
> of the magical md5sum.
> Maybe git-svn is to blame, perhaps a problem with the lifetime of the
> pools it uses...
>
I just modified the Swig generated svn_delta.c so that
_wrap_svn_txdelta_apply thinks
it is called with parameter pool = undef, forcing it to use a global pool
in the construction of
the magical md5sum. svn-git crashes with this, so its pool handling is not
to blame.
So back to your proposal, with the following patch svn-git has benn running
without crash for 15 minutes now.
It has the consequence that it breaks programs that care for the magical
md5sum, though.
But svn-git isn't affected (the way it calls SVN::TxDelta::apply makes sure
that the
magical md5sum is discarded).
Cheers, Roderich
Index: subversion/bindings/swig/include/svn_types.swg
===================================================================
--- subversion/bindings/swig/include/svn_types.swg (revision 1681105)
+++ subversion/bindings/swig/include/svn_types.swg (working copy)
@@ -1112,11 +1112,11 @@
#ifdef SWIGPERL
%typemap(in, numinputs=0) unsigned char *result_digest {
- $1 = (unsigned char *)apr_palloc(_global_pool, APR_MD5_DIGESTSIZE);
+ $1 = NULL; /* ignore */
}
%typemap(argout) unsigned char *result_digest {
- %append_output(svn_swig_pl_from_md5($1));
+ %append_output(&PL_sv_undef);
}
#endif
Index: subversion/bindings/swig/perl/native/t/5delta.t
===================================================================
--- subversion/bindings/swig/perl/native/t/5delta.t (revision 1681105)
+++ subversion/bindings/swig/perl/native/t/5delta.t (working copy)
@@ -21,7 +21,7 @@
#
use strict;
-use Test::More tests => 3;
+use Test::More tests => 2;
require SVN::Core;
require SVN::Delta;
@@ -42,6 +42,3 @@
# TEST
is($result, $tgttext, 'delta self test');
-
-# TEST
-is("$md5", 'a22b3dadcbddac48d2f1eae3ec5fb86a', 'md5 matched');