[csw-maintainers] Fwd: Re: libsvn_subr/dirent_uri.c dumps core when url contains a space

rupert THURNER rupert at opencsw.org
Mon Oct 31 18:40:18 CET 2011


fyi
---------- Forwarded message ----------
From: "Stefan Sperling" <stsp at elego.de>
Date: Oct 31, 2011 10:29 AM
Subject: Re: libsvn_subr/dirent_uri.c dumps core when url contains a space
To: "rupert.thurner" <rupert.thurner at gmail.com>
Cc: <dev at subversion.apache.org>

On Sun, Oct 30, 2011 at 10:09:52PM -0700, rupert.thurner wrote:
> on solaris the perl bindings dump a core when an url contains a space,
> see https://www.opencsw.org/mantis/view.php?id=4854. an excerpt:
>
> The SVN::Ra bindings core dump with the following error:
>
> $ perl ./test.pl
> svn: E235000: In file 'subversion/libsvn_subr/dirent_uri.c' line 2291:
> assertion failed (svn_uri_is_canonical(url, pool))
> Abort (core dumped)
>
>
> The content of test.pl:
>
> require SVN::Ra;
>
> $s = SVN::Ra->new('file:///home/bwalton/opencsw/git/trunk/work/
> solaris9-sparc/build-isa-sparcv8/git-1.7.7.1/t/trash [^]
> directory.t9134-git-svn-ignore-paths/svnrepo');

Your code is wrong. You have to canonicalize URLs and paths
before passing them into the SVN API.

Something like the following might work better (untested):

require SVN::Core;
require SVN::Ra;

my $url =
SVN::Core->svn_uri_canonicalize('file:///home/bwalton/opencsw/git/trunk/work/solaris9-sparc/build-isa-sparcv8/git-1.7.7.1/t/trash
[^] directory.t9134-git-svn-ignore-paths/svnrepo')
$s = SVN::Ra->new($url);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20111031/63ea37d6/attachment.html>


More information about the maintainers mailing list