Fix big-endian correctness defects found by Coverity
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(2 external files)
Two endianness defects reported by Coverity. Neither affects the shipping little-endian tier, but both are wrong on big-endian targets.
- CID 1459593 -
dom/canvas/WebGLContextState.cpp: a 64-bit timestamp was read through a narrower type, so the wrong half was returned on big-endian. - CID 1690687 -
gfx/2d/Swizzle.cpp:UnpackRowRGB24_To_ARGBpacked the ARGB components in little-endian order unconditionally.
Filed under Core :: General because the fixes span Graphics: CanvasWebGL and Graphics
Comment 1•2 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•2 months ago
|
||
On big-endian, the shifts placed red at bit 24 (colliding with the
0xFF000000 alpha constant) and mis-slotted green/blue. The A8R8G8B8
memory order requires (R << 16) | (G << 8) | B.
Updated•2 months ago
|
| Assignee | ||
Comment 3•2 months ago
|
||
fGetIntegerv wrote a 32-bit GLint into the address of a uint64_t,
landing in the wrong half on big-endian. Read into a GLint temporary
and assign instead.
Comment 6•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7599a6127a50
https://hg.mozilla.org/mozilla-central/rev/9639c9ef7eb7
Updated•2 months ago
|
Description
•