<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Replace incorrectly replaces files in thin archives"
   href="https://bugs.llvm.org/show_bug.cgi?id=39033">39033</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Replace incorrectly replaces files in thin archives
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>llvm-ar
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jh7370.2008@my.bristol.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This may be caused by the same issue causing <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llvm-ar 'Replace' option adds duplicate files to thin archives"
   href="show_bug.cgi?id=38542">bug 38542</a>, but the symptoms are
the opposite: in that bug, replace is not replacing things when it should,
whereas in this one, it is replacing things when it shouldn't, in some cases,
and in other cases, simply doesn't work:

Case 1:
C:\Work\TempWork>touch test.o
C:\Work\TempWork>touch ..\test.o
C:\Work\TempWork>llvm-ar rcT ..\test.a test.o
C:\Work\TempWork>llvm-ar rcT ..\test.a ..\test.o
C:\Work\TempWork>llvm-ar t ..\test.a
llvm-ar.exe: no such file or directory.
<prints help text>
# inspection of archive shows that the archive contains one member,
# with the path '../test.o/' when it should be 'test.o/'

Case 2:
C:\Work\TempWork>touch test.o
C:\Work\TempWork>touch ..\test.o
C:\Work\TempWork>llvm-ar rcT test.a test.o
C:\Work\TempWork>llvm-ar rcT test.a ../test.o
C:\Work\TempWork>llvm-ar t test.a
/../test.o
# should also have a member 'test.o'
# Note that adding the files in the other order works correctly.

I'm not sure if these are the same issue or not. Clearly, something is going
wrong with the path comparison here, just as in <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llvm-ar 'Replace' option adds duplicate files to thin archives"
   href="show_bug.cgi?id=38542">bug 38542</a>.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>