[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 <luke1410_at_posteo.de>
Date: Wed, 15 Jun 2016 10:13:08 +0200

On 6/15/2016 09:55, Stefan Sperling wrote:
> 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,

This sounds utterly familiar to me:

See this mail on the dev list: "[PATCH] error handling for
build_text_conflict_resolve_items" from 02/01/16:
http://mail-archives.apache.org/mod_mbox/subversion-dev/201602.mbox/%3C56AEA607.7030209%40posteo.de%3E

The position you add the check seems to differ slightly (I added the
mine_abspath check above the line which determines the conflict style,
but I'd be +1 (non-binding) with any of the two patches.

Regards,
Stefan

Received on 2016-06-15 10:13:27 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.