Closed
Bug 519338
Opened 15 years ago
Closed 15 years ago
Purify UMR in QCMS
Categories
(Core :: Graphics: Color Management, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta3-fixed |
status1.9.1 | --- | .6-fixed |
People
(Reporter: sayrer, Assigned: jrmuizel)
Details
Attachments
(2 files)
1.76 KB,
text/plain
|
Details | |
499 bytes,
patch
|
joe
:
review+
dveditz
:
approval1.9.1.6+
|
Details | Diff | Splinter Review |
will attach stack
Reporter | ||
Comment 1•15 years ago
|
||
Reporter | ||
Updated•15 years ago
|
Assignee: nobody → jmuizelaar
Assignee | ||
Comment 2•15 years ago
|
||
This UMR is mostly harmless because we never use the result. We just load the uninitialized value, take it along for the computation and discard it. This code has also been rewritten in bug 512865. Still, it doesn't hurt to initialize it so here's a patch.
Attachment #403412 -
Flags: review?(joe)
Comment 3•15 years ago
|
||
Comment on attachment 403412 [details] [diff] [review]
Initialize the unused element of the input array
>diff --git a/gfx/qcms/transform.c b/gfx/qcms/transform.c
>--- a/gfx/qcms/transform.c
>+++ b/gfx/qcms/transform.c
>@@ -812,6 +812,8 @@ static void qcms_transform_data_rgb_out_
> /* share input and output locations to save having to keep the
> * locations in separate registers */
> uint32_t* output = (uint32_t*)input;
>+
>+ input[3] = 0; /* initialize the unused 4th element of the input array */
Not the greatest place to put this, but C doesn't give us a lot of options.
Attachment #403412 -
Flags: review?(joe) → review+
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3)
> (From update of attachment 403412 [details] [diff] [review])
> >diff --git a/gfx/qcms/transform.c b/gfx/qcms/transform.c
> > uint32_t* output = (uint32_t*)input;
> >+
> >+ input[3] = 0; /* initialize the unused 4th element of the input array */
>
> Not the greatest place to put this, but C doesn't give us a lot of options.
Why not?
Comment 5•15 years ago
|
||
It should either go with the input stuff above output, or in the body of the loop (one is impossible, the other sub-optimal performance-wise).
Assignee | ||
Updated•15 years ago
|
Attachment #403412 -
Flags: approval1.9.1.5?
Comment 6•15 years ago
|
||
Comment on attachment 403412 [details] [diff] [review]
Initialize the unused element of the input array
Approved for 1.9.1.5, a=dveditz for release-drivers
Is there a testcase that exercises this code? Or does it happen with any graphics?
In addition to Purify, a windows debug build with the -RTCu or -RTC1 switch should also catch UMRs like this -- if a testcase causes the code to be executed.
Attachment #403412 -
Flags: approval1.9.1.5? → approval1.9.1.5+
Updated•15 years ago
|
Keywords: testcase-wanted
Assignee | ||
Updated•15 years ago
|
Attachment #403412 -
Flags: approval1.9.2?
Comment 7•15 years ago
|
||
status1.9.1:
--- → .6-fixed
Comment 8•15 years ago
|
||
This should block 1.9.2 since we took the patch on 1.9.1 and it'd otherwise be a regression when 1.9.2 ships.
Flags: blocking1.9.2?
Comment 9•15 years ago
|
||
Agreed; you can clear the approval request and land.
Flags: blocking1.9.2? → blocking1.9.2+
Assignee | ||
Comment 10•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 11•15 years ago
|
||
Does this need to land on mozilla-central?
Assignee | ||
Comment 12•15 years ago
|
||
No. Mozilla-central doesn't have this bug because the relevant code has been rewritten.
Updated•15 years ago
|
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Version: unspecified → 1.9.2 Branch
Updated•15 years ago
|
Attachment #403412 -
Flags: approval1.9.2?
Updated•9 years ago
|
Keywords: testcase-wanted
You need to log in
before you can comment on or make changes to this bug.
Description
•