You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2003/11/15 19:55:33 UTC

subversion/tests/libsvn_repos/repos-test.c test failures

repos-test.c is failing when built with APR pool debugging, valgrind
indicates that the test is reading free'd memory.

==9079== Invalid read of size 4
==9079==    at 0x4026D565: svn_fs_is_revision_root (../svn/subversion/libsvn_fs/tree.c:521)
==9079==    by 0x4026CA49: do_retry (../svn/subversion/libsvn_fs/trail.c:226)
==9079==    by 0x4026CBAB: svn_fs__retry_txn (../svn/subversion/libsvn_fs/trail.c:284)
==9079==    by 0x4027156C: svn_fs_copy (../svn/subversion/libsvn_fs/tree.c:3135)
==9079==    by 0x8049C71: dir_deltas (../svn/subversion/tests/libsvn_repos/repos-test.c:240)
==9079==    by 0x4023A3E4: do_test_num (../svn/subversion/tests/svn_tests_main.c:153)
==9079==    by 0x4023A8FC: main (../svn/subversion/tests/svn_tests_main.c:303)
==9079==    by 0x4045B14E: __libc_start_main (in /lib/libc-2.2.5.so)
==9079==    by 0x80490B0: (within /home/pm/sw/subversion/obj/subversion/tests/libsvn_repos/.libs/lt-repos-test)
==9079==    Address 0x41E16E40 is 8 bytes inside a block of size 160 free'd
==9079==    at 0x40028C2A: free (vg_replace_malloc.c:220)
==9079==    by 0x403B59C2: pool_clear_debug (apr_pools.c:1425)
==9079==    by 0x403B5AC3: apr_pool_destroy_debug (apr_pools.c:1486)
==9079==    by 0x403B59DB: pool_clear_debug (apr_pools.c:1407)
==9079==    by 0x403B5AC3: apr_pool_destroy_debug (apr_pools.c:1486)
==9079==    by 0x403B59DB: pool_clear_debug (apr_pools.c:1407)
==9079==    by 0x403B5A4E: apr_pool_clear_debug (apr_pools.c:1460)
==9079==    by 0x8049BE7: dir_deltas (../svn/subversion/tests/libsvn_repos/repos-test.c:233)
==9079==    by 0x4023A3E4: do_test_num (../svn/subversion/tests/svn_tests_main.c:153)

I'm using this patch to make the tests work, but I'm not sure if it's
the correct thing to do.

Index: subversion/tests/libsvn_repos/repos-test.c
===================================================================
--- subversion/tests/libsvn_repos/repos-test.c	(revision 7765)
+++ subversion/tests/libsvn_repos/repos-test.c	(working copy)
@@ -114,7 +114,6 @@
               expected_trees[revision_count].num_entries, subpool));
     revision_count++;
   }
-  svn_pool_clear (subpool);
 
   /* Make a new txn based on the youngest revision, make some changes,
      and commit those changes (which makes a new youngest
@@ -175,7 +174,6 @@
               expected_trees[revision_count].num_entries, subpool));
     revision_count++;
   } 
-  svn_pool_clear (subpool);
 
   /* Make a new txn based on the youngest revision, make some changes,
      and commit those changes (which makes a new youngest
@@ -230,7 +228,6 @@
               expected_trees[revision_count].num_entries, subpool));
     revision_count++;
   }
-  svn_pool_clear (subpool);
 
   /* Make a new txn based on the youngest revision, make some changes,
      and commit those changes (which makes a new youngest
@@ -286,7 +283,6 @@
               expected_trees[revision_count].num_entries, subpool));
     revision_count++;
   }
-  svn_pool_clear (subpool);
 
   /* THE BIG IDEA: Now that we have a collection of revisions, let's
      first make sure that given any two revisions, we can get the
@@ -340,7 +336,6 @@
              transaction...so we'll abort it (good for software, bad
              bad bad for society). */
           svn_error_clear (svn_fs_abort_txn (txn, subpool));
-          svn_pool_clear (subpool);
         }
     }
 



-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: subversion/tests/libsvn_repos/repos-test.c test failures

Posted by kf...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:
> > I'm using this patch to make the tests work, but I'm not sure if it's
> > the correct thing to do.
> 
> That patch was wrong, r7787 is right.

:-)

Heh.  Yes, r7787 looks a lot more "on target"...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: subversion/tests/libsvn_repos/repos-test.c test failures

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:

> repos-test.c is failing when built with APR pool debugging, valgrind
> indicates that the test is reading free'd memory.

[...]

> I'm using this patch to make the tests work, but I'm not sure if it's
> the correct thing to do.

That patch was wrong, r7787 is right.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org