Closed Bug 1874254 Opened 2 years ago Closed 2 years ago

Allow XZ decompression of both ARM and x86 BCJs on all platforms

Categories

(Toolkit :: Application Update, task, P2)

task

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(1 file)

I just got bitten by accidentally generating a (test) MAR with x86 BCJs and then discovering that when the relevant tests ran on Apple silicon, they failed with an UNEXPECTED_XZ_ERROR (link). It looks like this sort of problem has bitten us before in production (Bug 1677550).

I believe that it is possible to compile the decompression code in the updater such that any platform can successfully decompress MARs using x86 or ARM BCJs. Assuming that this works properly, an expected side effect will be a binary size increase. If, as I suspect, the increase is fairly small, I think that there is no harm in making the change and it has the potential to prevent problems similar to the ones described above from happening again.

Whiteboard: [fidedi-ope]
Blocks: 1848414

bhearsum: glandium: any reason not to enable at least X86 and ARM BCJs in xz-embedded in Firefox? It's used in mozglue for the linker and the updater.

Flags: needinfo?(mh+mozilla)
Flags: needinfo?(bhearsum)

For the updater, probably, but the linker actually doesn't need it at all anymore, so I'd rather strip the XZ support entirely from there. I'll do that in a separate bug.

Flags: needinfo?(mh+mozilla)
Depends on: 1874345

(In reply to Nick Alexander :nalexander [he/him] from comment #1)

bhearsum: glandium: any reason not to enable at least X86 and ARM BCJs in xz-embedded in Firefox? It's used in mozglue for the linker and the updater.

I can't think of any reason not to.

Flags: needinfo?(bhearsum)

It looks to me like the patch I've got works. In this Try job I put the patch on top of a patch that replaced a test MAR with one that had x86 BCJs, causing it to normally fail on Apple silicon. But with this patch, the tests run successfully on Apple silicon.

So I believe that this patch is correct. I'll go ahead and put it up for review.

Without this change, MARs compressed with (for example) x86 BCJ filters fail to decompress on Apple Silicon. This change isn't strictly necessary in that we are not planning to need this support, but it has the potential to prevent problems in testing and production. The consequences of turning it on should be minimal.

Blocks: 1874519
Pushed by rsteuber@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d39befe31ff8 Allow decompression of both x86 and ARM BCJs on all platforms r=nalexander,mhowell
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: