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

Re: svn trunk r24653: FAIL (i686-debian-sarge1 shared gcc-3.3.5)

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-04-19 17:51:22 CEST

> Thanks for taking a look at this Kamesh. One of these days I'll get a
> linux box set up...one of these days...
>
> Paul B.
>
Find the attached patch and Log.

Ran make check and make svnserveautocheck both ran without any
error.(Hope make davautocheck also to run without any error).

r23397 has caused 'svn_client_merge3' to have uninitialized garbage for
'children_with_mergeinfo' if the repo URLS are not same.

I am initializing it to NULL in this patch. I am not doing the same for
'svn_client_merge_peg3' as the code path executed makes sure non-nullity.

If one is paranoid about it or for consistency please to initialize
'children_with_mergeinfo' to NULL.

With regards
Kamesh Jayachandran

[[[
r23397 has caused 'svn_client_merge3' to have uninitialized garbage for
'children_with_mergeinfo' if the repo URLS are not same.

* subversion/libsvn_client/merge.c
  (do_merge):
   Fix docstring to mark 'CHILDREN_WITH_MERGEINFO' can be NULL.
   Fix the code to check for not-NULL before dereferencing it.
  (svn_client_merge3):
   Initialize children_with_mergeinfo to NULL.

Patch by: kameshj
]]]

Index: subversion/libsvn_client/merge.c
===================================================================
--- subversion/libsvn_client/merge.c (revision 24653)
+++ subversion/libsvn_client/merge.c (working copy)
@@ -1599,8 +1599,8 @@
    INITIAL_REVISION1.
 
    CHILDREN_WITH_MERGEINFO may contain child paths with merge info
- which differs from that of the merge target root (it may be empty,
- but not NULL). CHILDREN_WITH_MERGEINFO list should have entries sorted in
+ which differs from that of the merge target root (it may be empty, or NULL).
+ CHILDREN_WITH_MERGEINFO list should have entries sorted in
    depth first order as mandated by the reporter API.
    Because of this, we drive the diff editor in such a
    way that it avoids merging child paths when a merge is driven for
@@ -1815,7 +1815,7 @@
       SVN_ERR(reporter->set_path(report_baton, "",
                                  is_revert ? r->start : r->start - 1,
                                  depth, FALSE, NULL, pool));
- if (notify_b.same_urls)
+ if (notify_b.same_urls && children_with_mergeinfo)
         {
           /* Describe children with merge info overlapping this merge
              operation such that no diff is retrieved for them from
@@ -2321,7 +2321,7 @@
   const char *URL1, *URL2;
   const char *path1, *path2;
   svn_opt_revision_t peg_revision;
- apr_array_header_t *children_with_mergeinfo;
+ apr_array_header_t *children_with_mergeinfo=NULL;
 
   /* This is not a pegged merge. */
   peg_revision.kind = svn_opt_revision_unspecified;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 19 17:52:02 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.