Skip to content

Commit 7f6f75e

Browse files
Eric Wonggitster
authored andcommitted
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 <[email protected]> Reported-by: brian m. carlson <[email protected]> Signed-off-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8279ed0 commit 7f6f75e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

git-svn.perl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,11 @@ sub cmd_branch {
11991199
$ctx->copy($src, $rev, $dst)
12001200
unless $_dry_run;
12011201

1202+
# Release resources held by ctx before creating another SVN::Ra
1203+
# so destruction is orderly. This seems necessary with SVN 1.9.5
1204+
# to avoid segfaults.
1205+
$ctx = undef;
1206+
12021207
$gs->fetch_all;
12031208
}
12041209

0 commit comments

Comments
 (0)