+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 <julianf...@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 >