<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 - liblzma compress/uncompress mismatch when built with llvm >=12 on FreeBSD powerpc64 (BE)"
   href="https://bugs.llvm.org/show_bug.cgi?id=51714">51714</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>liblzma compress/uncompress mismatch when built with llvm >=12 on FreeBSD powerpc64 (BE)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alfredo.junior@eldorado.org.br
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On FreeBSD 13/powerpc64 (BE, ELFv2 ABI), a xz (liblzma.so) compiled with llvm12
or later isn't able to uncompress files produced by other machines or
downloaded from the Internet (data corruption). 
It can uncompress files compressed by itself (the same library binary), but
other machines won't recognize the .xz as well (data corruption).

Bisect points to this commit[1] as source of regression. Reverting it makes
liblzma.so work correctly again, but it's not clear to me how it's
interefering.

FreeBSD 13/powerpc64le and amd64 are not affected.


How to reproduce:
1 - install FreeBSD 13/powerpc64
2 - install llvm12 or latest devel (pkg install llvm12 llvm-devel)
3 - take source from <a href="http://git.tukaani.org/xz.git">http://git.tukaani.org/xz.git</a> and compile branch v5.0
using clang12 or later as CC
4 - download an .xz from the internet and try to uncompress it



[1]
<a href="https://github.com/llvm/llvm-project/commit/42eaf4fe0adef3344adfd9fbccd49f325cb549ef">https://github.com/llvm/llvm-project/commit/42eaf4fe0adef3344adfd9fbccd49f325cb549ef</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>