Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4300

Update segfaults with swapped depth dirs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: 1.8.0
    • Component/s: libsvn_wc
    • Labels:
      None

      Description

      When swapping the depth of two dirs (e.g. A/B becomes B/A) running update that brings in a file change inside one of the 
      directories results in a segfault.
      
      The following script exercises the issue (starting from a checkout of an empty repo):
      [[[
      #r1
      svn mkdir --parents A/B
      echo 'foo' > A/B/f
      svn add A/B/f
      svn commit -mm
      #r2
      echo 'bar' >> A/B/f
      svn commit -mm
      # go back to r1 and create local swapped depth dirs
      svn up -r1
      svn mv A/B B
      svn mv A B
      svn status
      svn up -r2
      ]]]
      
      The result of the status is as follows:
      [[[
      D       A
              > moved to B/A
      D       A/B
      D       A/B/f
      A  +    B
              > moved from B/A/B
      A  +    B/A
              > moved from A
      D  +    B/A/B
              > moved to B
      D  +    B/A/B/f
      ]]]
      
      The result of the update is:
      [[[
      Updating '.':
         C A
         U A/B/f
         U A/B
      Segmentation fault: 11
      ]]]
      
      What's happening is an infinite loop in bump_moved_away() in wc_db_update_move.c.
      
      I suspect that the infinite loop is occurring due the strangely self referential status output showing the delete of B/A/B.
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              breser Ben Reser
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: