Subject: i386 baseline violation in QCMS code

From: Fanael Linithien <[email-masked]>
Date: Tue, 1 Dec 2020 05:48:08 +0100

Package: firefox
Version: 83.0-1

Firefox crashes with SIGILL on CPUs that don't support SSE2, even
though Debian's baseline doesn't require it.

The crash manifests itself in qcms_transform_data_bgra_out_lut_sse2,
which uses SSE2 intrinsics, and so should never be reached on CPUs
that don't support SSE2, but is, at least on my Pentium III.

I'm 95% sure that the origin of the problem is sse_version_available,
in gfx/qcms/src/transform.rs: it's incorrectly defined to always
return 2, which is correct on AMD64, but not on IA-32:

    /* we know at build time that 64-bit CPUs always have SSE2
     * this tells the compiler that non-SSE2 branches will never be
     * taken (i.e. OK to optimze away the SSE1 and non-SIMD code */
    return 2;

The upstream commit that introduced the regression appears to be
25a50264ae3204f2df9add308fc712df45947637, which also incorrectly
dropped support for SSE 1, which is IIRC still supported by upstream,
it's just not tier 1 anymore and upstream *binaries* don't support it.