[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: don't use assert()

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: Sun, 06 Apr 2008 17:42:16 +0900 (JST)

In <47F88994.3050409_at_gmail.com>
  "Re: don't use assert()" on Sun, 06 Apr 2008 10:28:04 +0200,
  Stefan_Küng <tortoisesvn_at_gmail.com> wrote:

> Kouhei Sutou wrote:
> > Hi,
> >
> > svn_client_mergeinfo_log_merged() uses assert():
> >
> > assert(svn_path_is_url(merge_source_url));
> >
> > It aborts a program when svn_path_is_url returns false. This
> > behavior may be useful for a stand alone program but isn't
> > useful for a library. Could you return some svn_error_t *
> > instead of using assert()?
>
> Join the club:
> http://subversion.tigris.org/issues/show_bug.cgi?id=2780
>
> You're not the only one having problems with this...

Ahh...

It seems that svn_path_is_url(merge_source_url) is failed
easily by user input... And a program will be crashed and a
user will see like the following message that is not useful
for him:

  subversion/libsvn_client/mergeinfo.c:1144: svn_client_mergeinfo_log_merged: Assertion `svn_path_is_url(merge_source_url)' failed.

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-06 10:42:37 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.