You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Blair Zajac <bl...@orcaware.com> on 2006/02/22 06:01:13 UTC

The easiest core dump

I'm surprised this one hasn't been found yet.

$ svn log file://
svn: 
/var/rdiff-backups/blair/packaging/svn/subversion-1.3.0/subversion/libsvn_subr/path.c:377: 
svn_path_basename: Assertion `is_canonical (path, len)' failed.
Aborted (core dumped)

Reproduced with Ubuntu and DarwinPorts.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
<bl...@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: The easiest core dump

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Tue, 21 Feb 2006, Blair Zajac wrote:

> I'm surprised this one hasn't been found yet.
>
> $ svn log file://
> svn:
> /var/rdiff-backups/blair/packaging/svn/subversion-1.3.0/subversion/libsvn_subr/path.c:377:
> svn_path_basename: Assertion `is_canonical (path, len)' failed.
> Aborted (core dumped)
>
See issue #2116.

//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: The easiest core dump

Posted by Julian Foad <ju...@btopenworld.com>.
Blair Zajac wrote:
> I'm surprised this one hasn't been found yet.
> 
> $ svn log file://
> svn: 
> /var/rdiff-backups/blair/packaging/svn/subversion-1.3.0/subversion/libsvn_subr/path.c:377: 
> svn_path_basename: Assertion `is_canonical (path, len)' failed.
> Aborted (core dumped)

As Peter indicated, it has been found.  A partial fix was applied and, in the 
trunk, "file://" fails gracefully, but a quick test just now shows that it 
fails in the wrong way (regarding that as a local path rather than a URL), and 
anyway "file:///" still crashes.  It seems to be a fault in making/checking a 
"canonical" URL.

$ svn log file://
svn: 'file:' is not under version control
$ svn log file:///
[...]svn_path_basename: Assertion `is_canonical(path, len)' failed.
Aborted
$ svnversion .
18553M  (my modifications are not related to this issue)

To provide a starting point for continuing the discussion, this is what I last 
wrote about it in issue #2116 
<http://subversion.tigris.org/issues/show_bug.cgi?id=2116>:


------- Additional comments from Julian Foad Mon Aug 1 08:59:47 -0800 2005

The patch to fix the assertion failure by correcting svn_path_is_url() has
already been applied.

I am now attaching a patch to fix the remaining issue which is correcting
svn_path_canonicalize(), with a regression test and some other related tests.
This patch is extracted from Uwe Zeisberger's latest patch, updated to apply to
the current head of trunk, with the log message and whitespace tweaked by me.

I have one concern: the patch accepts an empty hostname, which is fine for
"file:///", but asks in a comment, "Can URIs of other types have an empty host?"
  It allows "http://" which causes an empty host name to be looked up on the
network (as far as I can tell from a quick manual test).  This results in the
following error message:

$ svn ls http://
svn: PROPFIND request failed on '/'
svn: PROPFIND of '/': Could not resolve hostname `': Host not found (http://)

Previously, this resulted in a perhaps incorrect error, but with no network access:

$ svn ls http://
svn: 'http:' has no URL

I'm not sure that allowing "http://" through to a network look-up is acceptable.

------- Additional comments from Julian Foad Mon Aug 1 09:01:40 -0800 2005

Created an attachment (id=497)
Patch for svn_path_canonicalize() to allow an empty hostname, e.g. "file://".


- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org