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

Non-thread-safe hash iterator [was: svn commit: r39768 - trunk/subversion/libsvn_fs_fs]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 08 Oct 2009 01:59:24 +0100

Greg Stein wrote:
> > +++ trunk/subversion/libsvn_fs_fs/fs_fs.c Fri Oct 2 10:22:06 2009 (r39768)
> >...
> > @@ -6185,18 +6172,17 @@ recover_find_max_ids(svn_fs_t *fs, svn_r
> > iterpool = svn_pool_create(pool);
> > for (hi = apr_hash_first(NULL, entries); hi; hi = apr_hash_next(hi))

Hey, look - - - - - - - - - ^^^

It's a case where we use the hash's non-thread-safe built-in iterator,
isn't it? I don't know whether it's demonstrably harmful in this case
but I think we want to avoid it (pass a pool instead of NULL).

Not related to this commit, of course.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404833
Received on 2009-10-08 10:29:05 CEST

This is an archived mail posted to the Subversion Dev mailing list.