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

Re: valgrind UMRs in "svn merge --record-only"

From: Martin Furter <mf_at_rola.ch>
Date: Mon, 30 Nov 2009 18:26:09 +0100 (CET)

On Mon, 30 Nov 2009, Philip Martin wrote:

> I'm seeing an unitialised memory read during "svn merge --record-only"
> in places like blame_tests.py 10. This happens when
> libsvn_client/repos_diff.c:add_directory calls
> libsvn_client/merge.c:merge_dir_added which does:
>
> /* Easy out: We are only applying mergeinfo changes to existing paths. */
> if (merge_b->record_only)
> {
> svn_pool_destroy(subpool);
> return SVN_NO_ERROR;
> }
>
> without setting *state so when add_directory then goes on the check
> state it triggers the UMR. One fix would be soemthing like:
>
> Index: subversion/libsvn_client/merge.c
> ===================================================================
> --- subversion/libsvn_client/merge.c (revision 885260)
> +++ subversion/libsvn_client/merge.c (working copy)
> @@ -2003,6 +2003,8 @@
> /* Easy out: We are only applying mergeinfo changes to existing paths. */
> if (merge_b->record_only)
> {
> + if (*state)
> + *state = svn_wc_notify_state_unknown;
> svn_pool_destroy(subpool);
> return SVN_NO_ERROR;
> }

I assume you wanted to write (as the rest of the code does):
   + if (state)

And the documentation doesn't indicate that state may be NULL. Is that a
documentation bug?

Martin

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2425588

Please start new threads on the <dev_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <dev-subscribe_at_subversion.apache.org>.
Received on 2009-11-30 18:26:40 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.