You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2018/09/23 09:01:14 UTC
svn commit: r1841725 - /subversion/trunk/subversion/svn/conflict-callbacks.c
Author: stsp
Date: Sun Sep 23 09:01:14 2018
New Revision: 1841725
URL: http://svn.apache.org/viewvc?rev=1841725&view=rev
Log:
Use an iterpool in the interactive conflict resolver loop.
* subversion/svn/conflict-callbacks.c
(svn_cl__resolve_conflict): Use an iterpool during interactive loop.
Prevents memory exhaustion in case the library keeps returning
SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, which can make 'svn' retry
in an endless loop.
Modified:
subversion/trunk/subversion/svn/conflict-callbacks.c
Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1841725&r1=1841724&r2=1841725&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Sun Sep 23 09:01:14 2018
@@ -2248,11 +2248,14 @@ svn_cl__resolve_conflict(svn_boolean_t *
svn_boolean_t postponed = FALSE;
svn_boolean_t printed_description = FALSE;
svn_error_t *err;
+ apr_pool_t *iterpool;
*quit = FALSE;
+ iterpool = svn_pool_create(scratch_pool);
while (!resolved && !postponed && !*quit)
{
+ svn_pool_clear(iterpool);
err = resolve_conflict_interactively(&resolved, &postponed, quit,
external_failed,
printed_summary,
@@ -2261,7 +2264,7 @@ svn_cl__resolve_conflict(svn_boolean_t *
editor_cmd, ctx->config,
path_prefix, pb,
conflict_stats, ctx,
- scratch_pool, scratch_pool);
+ iterpool, iterpool);
if (err && err->apr_err == SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE)
{
/* Conflict resolution has failed. Let the user try again.
@@ -2273,6 +2276,7 @@ svn_cl__resolve_conflict(svn_boolean_t *
}
SVN_ERR(err);
}
+ svn_pool_destroy(iterpool);
}
else if (option_id != svn_client_conflict_option_postpone)
SVN_ERR(mark_conflict_resolved(conflict, option_id,