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

Re: Subversion Exception!

From: Bert Huijben <bert_at_qqmail.nl>
Date: Fri, 28 Dec 2018 11:05:46 +0100

+svn_error_t *
+svn_error__malfunction_f(svn_boolean_t can_return,
+ const char *file, int line,
+ const char *fmt, ...)
+{
+ apr_pool_t *pool = svn_pool_create(NULL);
+ va_list ap;
+ const char *expr;
+
+ va_start(ap, fmt);
+ expr = apr_pvsprintf(pool, fmt, ap);
+ va_end(ap);
+ return malfunction_handler(can_return, file, line, expr);
+}
+

Can we somehow use a smarter pool (perhaps just require passing an existing
scratch pool as some similar apr apis do). Some library users do use the
can_return feature and/or exception handling and we would introduce a minor
memory leak.

Further +1

   Bert

On Thu, Dec 13, 2018 at 4:05 PM Julian Foad <julianfoad_at_apache.org> wrote:

> Johan Corveleyn wrote:
> > Just thinking out loud here, but could we perhaps log the
> > non-canonical value as part of the assertion output?
> > [...]
> > something like
> >
> > line 10238: assertion failed
> > (svn_dirent_is_absolute(local_abspath='C:ImNotCanonical'))
>
> Yes, Johan, we could do that.
>
> The attached patch demonstrates it working.
>
> Test output:
> [[[
> $ subversion/tests/libsvn_wc/wc-test 1
> ...
> svn_tests: E235000: In file '.../subversion/libsvn_wc/wc_db.c' line 10238:
> assertion failed (svn_dirent_is_absolute(local_abspath='C:ImNotAbsolute'))
> ...
> ]]]
>
> --
> - Julian
>
Received on 2018-12-28 11:06:16 CET

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.