You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2012/08/04 06:03:09 UTC

svn commit: r1369260 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/node.c

Author: svn-role
Date: Sat Aug  4 04:03:09 2012
New Revision: 1369260

URL: http://svn.apache.org/viewvc?rev=1369260&view=rev
Log:
Merge r1368065 from trunk:

 * r1368065
   Incomplete copy information leading to segfault.
   Justification:
      Although this doesn't address nor identify the root cause of
      the problem, it is still better to return an svn_error_t*
      instead of simply segfaulting.
      This issue is also the most common cause of SVN lib related
      crashes reported in TSVN.
   Votes:
     +1: stefan2, steveking, philip

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_wc/node.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1368065

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1369260&r1=1369259&r2=1369260&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Aug  4 04:03:09 2012
@@ -65,17 +65,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1368065
-   Incomplete copy information leading to segfault.
-   Justification:
-      Although this doesn't address nor identify the root cause of
-      the problem, it is still better to return an svn_error_t*
-      instead of simply segfaulting.
-      This issue is also the most common cause of SVN lib related
-      crashes reported in TSVN.
-   Votes:
-     +1: stefan2, steveking, philip
-
  * r1368128
    Segfault in handling deleted wc items.
    Justification:

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/node.c?rev=1369260&r1=1369259&r2=1369260&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/node.c Sat Aug  4 04:03:09 2012
@@ -1407,6 +1407,15 @@ svn_wc__internal_get_origin(svn_boolean_
             return SVN_NO_ERROR; /* Local addition */
           }
 
+        /* We don't know how the following error condition can be fulfilled
+         * but we have seen that happening in the wild.  Better to create
+         * an error than a SEGFAULT. */
+        if (status == svn_wc__db_status_incomplete && !original_repos_relpath)
+          return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+                               _("Incomplete copy information on path '%s'."),
+                                   svn_dirent_local_style(local_abspath,
+                                                          scratch_pool));
+
         *repos_relpath = svn_relpath_join(
                                 original_repos_relpath,
                                 svn_dirent_skip_ancestor(op_root_abspath,