[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Segmentation fault in "svn resolve"

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 15 Jun 2016 09:55:30 +0200

On Wed, Jun 15, 2016 at 09:33:52AM +0200, Stefan Sperling wrote:
> On Tue, Jun 14, 2016 at 07:57:39PM -0300, Gustavo Chaves wrote:
> > I got a "segmentation fault" while performing a "svn resolve" to resolve a
> > conflict in a file with the svn:mime-type property set to
> > application/octet-stream. I got the same error using the WANdisco packages
> > for svn-1.9.4 at RHEL and using Ubuntu 16.04 native package for svn-1.9.3.
> >
> > I was able to reproduce the problem in a small scale following the steps
> > below, in my Ubuntu 16.04 machine.
> >
> > Should I open an issue?
>
> I can reproduce this problem. I will fix it. Thanks for your report!

The problem here is that the working copy code wrongly assumes it can
create a merged version of the file.

I think we should fix it like this. Does this make sense?

$ svn resolve --accept mc file
svn: warning: apr_err=SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE
svn: warning: W155027: Conflict on '/tmp/svn-sandbox/branch/file' cannot be resolved to 'theirs-conflict' or 'mine-conflict' because a merged version of the file cannot be created.

Index: subversion/libsvn_wc/conflicts.c
===================================================================
--- subversion/libsvn_wc/conflicts.c (revision 1748508)
+++ subversion/libsvn_wc/conflicts.c (working copy)
@@ -1633,6 +1633,15 @@ build_text_conflict_resolve_items(svn_skel_t **wor
                 ? svn_diff_conflict_display_latest
                 : svn_diff_conflict_display_modified;
 
+ if (mine_abspath == NULL)
+ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
+ _("Conflict on '%s' cannot be resolved to "
+ "'theirs-conflict' or 'mine-conflict' "
+ "because a merged version of the file "
+ "cannot be created."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
           SVN_ERR(merge_showing_conflicts(&install_from_abspath,
                                           db, local_abspath,
                                           style, merge_options,
Received on 2016-06-15 09:55:41 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.