Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-01-30 02:11:07 +0300
committerJunio C Hamano <gitster@pobox.com>2018-01-31 00:14:38 +0300
commit7f6f75e97acd25f8e95ce431e16d2e1c2093845d (patch)
tree0c9f2077e0d4626c9be5cbf5cd2a8c6d8f55f6c3 /git-svn.perl
parent8279ed033f703d4115bee620dccd32a9ec94d9aa (diff)
git-svn: control destruction order to avoid segfault
It seems necessary to control destruction ordering to avoid a segfault with SVN 1.9.5 when using "git svn branch". I've also reported the problem against libsvn-perl to Debian [Bug #888791], but releasing the SVN::Client instance can be beneficial anyways to save memory. ref: https://bugs.debian.org/888791 Tested-by: Todd Zullinger <tmz@pobox.com> Reported-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index aa242d4f4f..b012980246 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1199,6 +1199,11 @@ sub cmd_branch {
$ctx->copy($src, $rev, $dst)
unless $_dry_run;
+ # Release resources held by ctx before creating another SVN::Ra
+ # so destruction is orderly. This seems necessary with SVN 1.9.5
+ # to avoid segfaults.
+ $ctx = undef;
+
$gs->fetch_all;
}