The add_directory() function had a similar problem, so if you apply a
workaround you might want to do that there too.
I nominated the fixes for backport to 1.8.x.
Thanks for your detailed bug report!
From: Stefan Fuhrmann [mailto:stefan.fuhrmann_at_wandisco.com]
Sent: woensdag 25 december 2013 13:55
To: Roman Kagan
Cc: Subversion Development
Subject: Re: [PATCH] ra_serf:commit.c: add missing strdup
On Tue, Dec 24, 2013 at 11:18 PM, Roman Kagan <rkagan_at_mail.ru
<mailto:rkagan_at_mail.ru> > wrote:
The file context created in add_file() is supposed to survive beyond the
end of function, so it needs its own copy of copy_path.
The failure scenario was observed in git-svn usage, with errors like
perl: subversion/libsvn_subr/dirent_uri.c:2489: svn_fspath__skip_ancestor:
Assertion `svn_fspath__is_canonical(child_fspath)' failed.
The second link also includes my analysis and a workaround for git-svn
--- subversion/libsvn_ra_serf/commit.c (revision 1553332)
+++ subversion/libsvn_ra_serf/commit.c (working copy)
@@ -1872,7 +1872,7 @@ add_file(const char *path,
new_file->name = svn_relpath_basename(new_file->relpath, NULL);
new_file->added = TRUE;
new_file->base_revision = SVN_INVALID_REVNUM;
- new_file->copy_path = copy_path;
+ new_file->copy_path = apr_pstrdup(new_file->pool, copy_path);
new_file->copy_revision = copy_revision;
new_file->changed_props = apr_hash_make(new_file->pool);
new_file->removed_props = apr_hash_make(new_file->pool);
Thanks for the patch! Committed as r1553376.
Received on 2013-12-28 00:46:28 CET