You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Szakmeister <jo...@szakmeister.net> on 2005/08/21 14:41:46 UTC

Another segfault in the wc prop merge code...

It appears that there is another bug lingering in the wc prop merge code.  
It's possible for the server_baseprops parameter to svn_wc__merge_props() to 
be NULL.  The following statement in svn_wc__merge_props() causes the 
segfault:
 from_val = apr_hash_get (server_baseprops, propname, APR_HASH_KEY_STRING);

I'm not sure what the correct behavior should be.  Looking at 
svn_wc_merge_props() it's unclear whether baseprops is allowed to be NULL 
(baseprops eventually makes it's way down as server_baseprops in 
svn_wc__merge_props()).  So I decided to toss this to the list to see what 
the WC experts think of the situation.

Reproduction recipe:

svn up -r15856
svn merge \ 
  http://svn.collab.net/repos/svn/branches/python-bindings-improvements \
  -r15854:15856 .                                                    

The merge will generate the segfault.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Another segfault in the wc prop merge code...

Posted by Philip Martin <ph...@codematters.co.uk>.
John Szakmeister <jo...@szakmeister.net> writes:

> I'm not sure what the correct behavior should be.  Looking at 
> svn_wc_merge_props() it's unclear whether baseprops is allowed to be NULL 
> (baseprops eventually makes it's way down as server_baseprops in 
> svn_wc__merge_props()).  So I decided to toss this to the list to see what 
> the WC experts think of the situation.

This makes directory adds behave like file adds:

Index: subversion/libsvn_client/repos_diff.c
===================================================================
--- subversion/libsvn_client/repos_diff.c	(revision 15873)
+++ subversion/libsvn_client/repos_diff.c	(working copy)
@@ -588,6 +588,7 @@
   /* ### TODO: support copyfrom? */
 
   b = make_dir_baton (path, pb, pb->edit_baton, TRUE, pool);
+  b->pristine_props = pb->edit_baton->empty_hash;
   *child_baton = b;
 
   SVN_ERR (get_path_access (&adm_access,

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Another segfault in the wc prop merge code...

Posted by John Szakmeister <jo...@szakmeister.net>.
On Sunday 21 August 2005 10:41, John Szakmeister wrote:
> It appears that there is another bug lingering in the wc prop merge code.
> It's possible for the server_baseprops parameter to svn_wc__merge_props()
> to be NULL.  The following statement in svn_wc__merge_props() causes the
> segfault:
>  from_val = apr_hash_get (server_baseprops, propname, APR_HASH_KEY_STRING);
>
> I'm not sure what the correct behavior should be.  Looking at
> svn_wc_merge_props() it's unclear whether baseprops is allowed to be NULL
> (baseprops eventually makes it's way down as server_baseprops in
> svn_wc__merge_props()).  So I decided to toss this to the list to see what
> the WC experts think of the situation.
>
> Reproduction recipe:
>
> svn up -r15856
> svn merge \
>   http://svn.collab.net/repos/svn/branches/python-bindings-improvements \
>   -r15854:15856 .

I forgot to mention that I used the command line client built trunk at r15856.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Another segfault in the wc prop merge code...

Posted by Philip Martin <ph...@codematters.co.uk>.
John Szakmeister <jo...@szakmeister.net> writes:

> Reproduction recipe:
>
> svn up -r15856
> svn merge \ 
>   http://svn.collab.net/repos/svn/branches/python-bindings-improvements \
>   -r15854:15856 .                                                    
>
> The merge will generate the segfault.

A merge that adds a directory with properties is the problem:

#!/bin/bash

SVN=svn
REPO=file://`pwd`/repo
#REPO=svn://localhost/repo
#REPO=http://localhost:8888/obj/repo
rm -rf repo wc
#svnadmin create --fs-type bdb --bdb-txn-nosync repo
svnadmin create repo
echo [general] >> repo/conf/svnserve.conf
echo anon-access = write >> repo/conf/svnserve.conf
#echo auth-access = write >> repo/conf/svnserve.conf
echo password-db = passwd >> repo/conf/svnserve.conf
echo [users] >> repo/conf/passwd
echo pm = mp >> repo/conf/passwd
echo xx = xx >> repo/conf/passwd

$SVN mkdir $REPO/foo $REPO/bar
$SVN co $REPO wc
$SVN mkdir wc/foo/zig
$SVN ps x x wc/foo/zig
$SVN ci wc
$SVN merge -r1:HEAD $REPO/foo wc/bar

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org