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

Re: svn commit: r1683126 - /subversion/trunk/subversion/libsvn_fs_x/cached_data.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Tue, 02 Jun 2015 19:42:29 +0200

On 02.06.2015 18:30, Bert Huijben wrote:
> Strange… this should never be necessarily when *removing* something
> from a hash (value =NULL).
>
> I think you see some kind of other problem.
>
> Bert
>
> Sent from Surface
>
> *From:* Philip Martin <mailto:philip_at_apache.org>
> *Sent:* ‎Tuesday‎, ‎June‎ ‎2‎, ‎2015 ‎5‎:‎19‎ ‎PM
> *To:* commits_at_subversion.apache.org <mailto:commits_at_subversion.apache.org>
>
> Author: philip
> Date: Tue Jun 2 15:19:26 2015
> New Revision: 1683126
>
> URL: http://svn.apache.org/r1683126
> Log:
> Avoid using pool memory after clear in FSX.
>
> * subversion/libsvn_fs_x/cached_data.c
> (read_dir_entries): Copy hashed values into hash pool.
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_x/cached_data.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.c?rev=1683126&r1=1683125&r2=1683126&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Tue Jun 2
> 15:19:26 2015
> @@ -2494,7 +2494,9 @@ read_dir_entries(apr_array_header_t *ent
> {
> /* We must be in incremental mode */
> assert(hash);
> - apr_hash_set(hash, entry.key, entry.keylen, NULL);
> + apr_hash_set(hash,
> + apr_pstrmemdup(scratch_pool, entry.key,
> entry.keylen),
> + entry.keylen, NULL);
> continue;
> }

I agree with Bert: this change is unnecessary.

-- Brane
Received on 2015-06-02 19:43:28 CEST

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.