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

Re: Non-thread-safe hash iterator

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

I (Julian Foad) wrote:
> After applying the attached patch, the following instances would remain:
>
> [[[
> $ find subversion/ -name '*.[ch]' | xargs grep -n "apr_hash_first.*NULL"
> subversion/libsvn_subr/hash.c:502: for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi))
> subversion/libsvn_client/merge.c:6700: for (hi = apr_hash_first(NULL, subtrees);
> subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:507: for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi))
> subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:755: for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi))
> subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:856: for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi))
> subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:1408: for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi)) {
> subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c:240: for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi)) {
> ]]]
>
> The ones in merge.c and hash.c I can easily fix too by passing a pool to
> those functions.

I applied the patch in r39869 and fixed the ones in merge.c and hash.c
in r39873.

> The ones in swigutil_*.c I'm not sure about, as they seem to be public
> functions. Do they need this treatment?

I don't know whether to touch those, not being familiar with SWIG.

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405025
Received on 2009-10-08 16:16:22 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.