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:12 UTC

svn commit: r1369261 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/wc_db.c

Author: svn-role
Date: Sat Aug  4 04:03:12 2012
New Revision: 1369261

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

 * r1368128
   Segfault in handling deleted wc items.
   Justification:
      Unknown circumstances can lead to the situation that neither
      the relpath for BASE nor the one for WORK are available.
      The patch makes the implicit assumption of the latter being
      non-NULL if the first isn't explicit. Even if the root cause
      was random wc corruption, this patch will at least make our
      code more robust.
      This issue is also the 3rd-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/wc_db.c

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

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1369261&r1=1369260&r2=1369261&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Aug  4 04:03:12 2012
@@ -64,17 +64,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1368128
-   Segfault in handling deleted wc items.
-   Justification:
-      Unknown circumstances can lead to the situation that neither
-      the relpath for BASE nor the one for WORK are available.
-      The patch makes the implicit assumption of the latter being
-      non-NULL if the first isn't explicit. Even if the root cause
-      was random wc corruption, this patch will at least make our
-      code more robust.
-      This issue is also the 3rd-most common cause of SVN lib related
-      crashes reported in TSVN.
-   Votes:
-     +1: stefan2, steveking, philip

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c?rev=1369261&r1=1369260&r2=1369261&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c Sat Aug  4 04:03:12 2012
@@ -7420,8 +7420,15 @@ read_url_txn(void *baton,
           else
             {
               /* The parent of the WORKING delete, must be an addition */
-              const char *work_relpath = svn_relpath_dirname(work_del_relpath,
-                                                             scratch_pool);
+              const char *work_relpath = NULL;
+
+              /* work_del_relpath should not be NULL. However, we have
+               * observed instances where that assumption was not met.
+               * Bail out in that case instead of crashing with a segfault.
+               */
+              SVN_ERR_ASSERT(work_del_relpath != NULL);
+              work_relpath = svn_relpath_dirname(work_del_relpath,
+                                                 scratch_pool);
 
               SVN_ERR(scan_addition(NULL, NULL, &repos_relpath, &repos_id,
                                     NULL, NULL, NULL,