Closed Bug 1058561 Opened 10 years ago Closed 9 years ago

forcing mozilla::image::{Angle,Flip} to actual 8-bit types on B2G causes reftest failures

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: froydnj, Unassigned)

References

Details

Several months ago, it was noticed that B2G's compiler supports:

enum Foo : type {
};

syntax, and we weren't using that fact in mfbt/TypedEnum.h.  However, a patch to relax the GCC version requirements for that resulted in mysterious reftest failures when landed on inbound:

REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?0 | image comparison (==), max difference: 254, number of differing pixels: 15000
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?90 | image comparison (==), max difference: 255, number of differing pixels: 80000
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?180 | image comparison (==), max difference: 255, number of differing pixels: 15000
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?270 | image comparison (==), max difference: 255, number of differing pixels: 70001
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?0&flip | image comparison (==), max difference: 254, number of differing pixels: 15001
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?90&flip | image comparison (==), max difference: 255, number of differing pixels: 80000
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?180&flip | image comparison (==), max difference: 255, number of differing pixels: 15000
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-from-image.html?270&flip | image comparison (==), max difference: 255, number of differing pixels: 80000
REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/layout/reftests/image/image-orientation-generated-content.html?from-image | image comparison (==), max difference: 255, number of differing pixels: 30000

REFTEST TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/content/html/document/reftests/bug917595-exif-rotated.jpg | image comparison (==), max difference: 180, number of differing pixels: 425498

Some testing revealed that forcing mozilla::image::{Angle,Flip} to be considered as 8-bit enums, rather than the default 32-bit enums, is responsible for those reftest failures:

https://tbpl.mozilla.org/?tree=Try&rev=9d91787932ee

It's not obvious to me whether this is a subtle fault in the code somewhere, or simply a peculiarity in B2G's compiler that somehow miscompiles this case.  I am more inclined to believe the latter, simply because the 8-bit code paths are well-tested by our other compilers, but I am also willing to entertain other theories.
Is this with gcc 4.4 (aka B2G ICS emulator builds)?
(In reply to :Ehsan Akhgari (not reading bugmail, needinfo? me!) from comment #1)
> Is this with gcc 4.4 (aka B2G ICS emulator builds)?

Yes.
If this is only on GCC 4.4, and it works on other compilers, then I'm inclined to just make this depend on bug 1056337, since presumably we're about to stop using GCC 4.4 anyway.
Depends on: 1056337
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.