Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AE35E200B13 for ; Wed, 15 Jun 2016 09:55:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AC9FC160A4C; Wed, 15 Jun 2016 07:55:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 02EEC160A4D for ; Wed, 15 Jun 2016 09:55:40 +0200 (CEST) Received: (qmail 27427 invoked by uid 500); 15 Jun 2016 07:55:40 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 27235 invoked by uid 99); 15 Jun 2016 07:55:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2016 07:55:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 41BC31A0CFB for ; Wed, 15 Jun 2016 07:55:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.719 X-Spam-Level: X-Spam-Status: No, score=-0.719 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id N6tGK_7AMeo4 for ; Wed, 15 Jun 2016 07:55:37 +0000 (UTC) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 651845F1F7 for ; Wed, 15 Jun 2016 07:55:37 +0000 (UTC) X-Envelope-From: stsp@elego.de Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id u5F7tUch010161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jun 2016 09:55:30 +0200 Received: from localhost (ted.stsp.name [local]) by ted.stsp.name (OpenSMTPD) with ESMTPA id 3b8513bf; Wed, 15 Jun 2016 09:55:30 +0200 (CEST) Date: Wed, 15 Jun 2016 09:55:30 +0200 From: Stefan Sperling To: Gustavo Chaves , users@subversion.apache.org Subject: Re: Segmentation fault in "svn resolve" Message-ID: <20160615075530.GY5717@ted.stsp.name> Mail-Followup-To: Gustavo Chaves , users@subversion.apache.org References: <20160615073352.GX5717@ted.stsp.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160615073352.GX5717@ted.stsp.name> User-Agent: Mutt/1.5.24 (2015-08-30) archived-at: Wed, 15 Jun 2016 07:55:41 -0000 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,