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

Re: svn commit: r34213 - trunk/subversion/libsvn_fs_fs

From: Philip Martin <philip_at_codematters.co.uk>
Date: Sun, 23 Nov 2008 21:52:53 +0000

Blair Zajac <blair_at_orcaware.com> writes:

>>> + conflict = svn_stringbuf_create("", iterpool);
>>
>> Allocating conflict from iterpool causes fs-test 32 to fail:
>>
>> valgrind -q subversion/tests/libsvn_fs/.libs/lt-fs-test 32
>> ==17969== Invalid read of size 1
>> ==17969== at 0x4A1C7D1: strcmp (mc_replace_strmem.c:341)
>> ==17969== by 0x40246E: test_commit_txn (fs-test.c:87)
>> ==17969== by 0x412E2B: unordered_txn_dirprops (fs-test.c:4706)
>> ==17969== by 0x4B2499A: do_test_num (svn_test_main.c:192)
>> ==17969== by 0x4B25132: main (svn_test_main.c:395)
>> ==17969== Address 0x8D59D28 is 0 bytes inside a block of size 8 free'd
>> ==17969== at 0x4A1B46D: free (vg_replace_malloc.c:233)
>> ==17969== by 0x50C978B: pool_clear_debug (apr_pools.c:1395)
>> ==17969== by 0x50C989D: pool_destroy_debug (apr_pools.c:1457)
>> ==17969== by 0x5AC3DD3: svn_fs_fs__commit_txn (tree.c:1739)
>> ==17969== by 0x4C2B191: svn_fs_commit_txn (fs-loader.c:628)
>> ==17969== by 0x402394: test_commit_txn (fs-test.c:67)
>> ==17969== by 0x412E2B: unordered_txn_dirprops (fs-test.c:4706)
>> ==17969== by 0x4B2499A: do_test_num (svn_test_main.c:192)
>> ==17969== by 0x4B25132: main (svn_test_main.c:395)
>>
>> Would it work to create the conflict stringbuf in pool outside the
>> looop? Or...
>
> Hi Philip,
>
> Thanks. Is this a new error?

Since r34213.

> I ran the entire test suite with trunk
> before I committed it and didn't get a core dump.

You probably won't see it unless you enable APR pool debugging. I'm
currently using the following patch:

Index: subversion/libsvn_fs_fs/tree.c
===================================================================
--- subversion/libsvn_fs_fs/tree.c (revision 34355)
+++ subversion/libsvn_fs_fs/tree.c (working copy)
@@ -1650,6 +1650,7 @@
 
   svn_error_t *err = SVN_NO_ERROR;
   svn_revnum_t new_rev;
+ svn_stringbuf_t *conflict = svn_stringbuf_create("", pool);
   svn_fs_t *fs = txn->fs;
 
   /* Limit memory usage when the repository has a high commit rate and
@@ -1668,12 +1669,9 @@
       svn_revnum_t youngish_rev;
       svn_fs_root_t *youngish_root;
       dag_node_t *youngish_root_node;
- svn_stringbuf_t *conflict;
 
       svn_pool_clear(iterpool);
 
- conflict = svn_stringbuf_create("", iterpool);
-
       /* Get the *current* youngest revision, in one short-lived
          Berkeley transaction. (We don't want the revisions table
          locked while we do the main merge.) We call it "youngish"

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-23 22:53:12 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.