Skip to content

liblzma compress/uncompress mismatch when built with llvm >=12 on FreeBSD powerpc64 (BE) #51056

@adalava

Description

@adalava
mannequin
Bugzilla Link 51714
Resolution FIXED
Resolved on Sep 08, 2021 20:49
Version unspecified
OS FreeBSD
Blocks #48661 #50580
CC @DimitryAndric,@efriedma-quic,@emaste,@LebedevRI,@preames,@sparker-arm,@tstellar
Fixed by commit(s) 34badc4 b77c810

Extended Description

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 http://git.tukaani.org/xz.git and compile branch v5.0 using clang12 or later as CC
4 - download an .xz from the internet and try to uncompress it

[1] 42eaf4f

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions