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

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

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-18 00:26:59 CEST

So, do we know of any platforms where sizeof(svn_fs_id_t *) !=
sizeof(apr_hash_t *)? If such a thing actually exists, then this
could cause memory corruption (or an incompletely cleared cache) and
we might consider a backport.

--dave

On 10/17/07, glasser@tigris.org <glasser@tigris.org> wrote:
> Author: glasser
> Date: Wed Oct 17 15:24:18 2007
> New Revision: 27263
>
> Log:
> Fix a sizeof to take the size of the correct pointer type.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (svn_fs_fs__abort_txn): dir_cache_id is an array of svn_fs_id_t *,
> not apr_hash_t *, so use that when calculating the block of memory
> to memset.
>
>
> Modified:
> trunk/subversion/libsvn_fs_fs/fs_fs.c
>
> Modified: trunk/subversion/libsvn_fs_fs/fs_fs.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_fs/fs_fs.c?pathrev=27263&r1=27262&r2=27263
> ==============================================================================
> --- trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Oct 17 15:24:18 2007
> @@ -3667,7 +3667,7 @@
> /* Clean out the directory cache. */
> ffd = txn->fs->fsap_data;
> memset(&ffd->dir_cache_id, 0,
> - sizeof(apr_hash_t *) * NUM_DIR_CACHE_ENTRIES);
> + sizeof(svn_fs_id_t *) * NUM_DIR_CACHE_ENTRIES);
>
> /* Now, purge the transaction. */
> SVN_ERR_W(svn_fs_fs__purge_txn(txn->fs, txn->id, pool),
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 18 00:27:14 2007

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.