Checkout
Stefan Sperling
committed
on 14 Mar
Plug error leaks in newly added mergeinfo tests.

Found by: svn-bb-openbsd buildbot
https://ci.apache.org/builders/svn-bb-openbsd/builds/510Show more
Plug error leaks in newly added mergeinfo tests.

Found by: svn-bb-openbsd buildbot

https://ci.apache.org/builders/svn-bb-openbsd/builds/510/steps/Test/logs/faillog-ra_svn-fsfs

[[[

subversion/tests/svn_test_main.c:475: (apr_err=SVN_ERR_TEST_FAILED)

svn_tests: E200006: Test crashed (run in debugger with '--allow-segfaults')

FAIL:  mergeinfo-test 25: test rangelist merge random non-validated inputs

]]]

Core was generated by `mergeinfo-test'.

Program terminated with signal SIGABRT, Aborted.

#0  *_libc_abort () at /usr/src/lib/libc/stdlib/abort.c:57

57              memset(&sa, 0, sizeof(sa));

(gdb) up

#1  0x0000010070bcff68 in err_abort (data=0x10022671880)

156         abort();

(gdb) list

151     {

152       svn_error_t *err = data;  /* For easy viewing in a debugger */

153       SVN_UNUSED(err);

154

155       if (!getenv("SVN_DBG_NO_ABORT_ON_ERROR_LEAK"))

156         abort();

157       return APR_SUCCESS;

158     }

159     #endif

160

(gdb) p *err

$3 = {apr_err = 235000,

 message = 0x1001bc9c280 "In file 'subversion/libsvn_subr/mergeinfo.c' line 1096: assertion failed (rangelist_is_sorted(chg))", child = 0x0,

 pool = 0x10085adbc00,

 file = 0x10070d799b0 "subversion/libsvn_subr/mergeinfo.c", line = 1096}

(gdb)

* subversion/tests/libsvn_subr/mergeinfo-test.c

 (clear_failure_mode_errors): New helper function. Clears errors accumulated

  during a test run.

 (test_rangelist_merge_random_canonical_inputs,

  test_rangelist_merge_random_semi_c_inputs,

  test_rangelist_merge_random_non_validated_inputs): Clear accumulated errors.

Show less