On Tue, 2005-12-06 at 17:31 +0000, Malcolm Rowe wrote:
> On Tue, Dec 06, 2005 at 05:37:23PM +0100, Mathias Weinert wrote:
> > 1. The script is not very robust against wrong command line
> > arguments. You get for example an assertion if you call it with
> > a repos path with a trailing slash (like bash completion
> > provides it):
> > assertion "is_canonical (base, blen)" failed: file "subversion/libsvn_subr/path.c", line 114
> > Aborted (core dumped)
> This is a bug in the Subversion libraries - we should never abort()
> if a caller supplies a path with a trailing slash by mistake.
> See attached testcase: it looks like svn_repos_open() (at least) needs
> to validate (or massage) its input better.
> $ ./svn_repos_open_assert
> svn_repos_open_assert: subversion/libsvn_subr/path.c:114: svn_path_join: Assertion `is_canonical (base, blen)' failed.
On the contrary -- the Subversion public APIs declare that callers must
provide canonicalized paths as input, and even provide functions for
doing said canonicalization. The assertion exists to notify callers (in
perhaps the harshest way possible) that they've violated the function's
C. Michael Pilato <firstname.lastname@example.org>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on Tue Dec 6 19:10:58 2005