Page MenuHomeFreeBSD

llvm: fix/workaround liblzma incorrect compress/uncompress
ClosedPublic

Authored by alfredo on Sep 2 2021, 3:06 PM.

Details

Summary
Reverts llvm commit 42eaf4fe0adef3344adfd9fbccd49f325cb549ef, pointed from
bisect as source of regression that causes liblzma to compress/uncompress
incorrectly. It's know to affect powerpc64 BE only.

The patch unbreaks FreeBSD powerpc64 installation media, since bsdinstall
cannot uncompress the *.txz files produced by FreeBSD CI (data corruption).

Reported to upstream in: https://bugs.llvm.org/show_bug.cgi?id=51714

MFC after:      2 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alfredo retitled this revision from llvm: fix/workaround liblzma incorrect encode/decode to llvm: fix/workaround liblzma incorrect compress/uncompress.Sep 2 2021, 5:31 PM
alfredo edited the summary of this revision. (Show Details)

Let's do this for now to get the PowerPC builds working again. But also be aware that the bisected upstream commit is only exposing an underlying issue: most likely the root cause is in the PowerPC backend.

This revision is now accepted and ready to land.Sep 2 2021, 9:26 PM
In D31804#717525, @dim wrote:

Let's do this for now to get the PowerPC builds working again. But also be aware that the bisected upstream commit is only exposing an underlying issue: most likely the root cause is in the PowerPC backend.

For this specific case Reames verified our PR in the upstream and noticied a bug in the original implementation [1]. Chen Zheng decided to revert [2] the change on LLVM/main as well, so it looks safe for us do do the same.
The PR on upstream was marked as LLVM 12 and LLVM13 blocker candidates. I'll keep tracking the other issues.

Thanks!

[1] https://reviews.llvm.org/D91724
[2] https://reviews.llvm.org/rG34badc409cc452575c538c4b6449546adc38f121