Closed
Bug 571823
Opened 14 years ago
Closed 14 years ago
UMR [@ nsHTMLSelectOptionAccessible::GetStateInternal]
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: davidb)
References
Details
(Keywords: testcase, valgrind)
Attachments
(3 files, 2 obsolete files)
1. Run Firefox under Valgrind. 2. Enable accessibility, e.g. by pasting the following into the js console Components.classes["@mozilla.org/accessibilityService;1"] .getService(Components.interfaces.nsIAccessibleRetrieval); 3. Load the testcase Result: Valgrind complains of a UMR [@ nsHTMLSelectOptionAccessible::GetStateInternal] Looks like GetStateInternal expects nsHTMLSelectOptionAccessible::GetSelectState to always set its out-params, and that isn't happening in this case.
Reporter | ||
Comment 1•14 years ago
|
||
Assignee | ||
Comment 2•14 years ago
|
||
Assignee: nobody → bolterbugz
Attachment #451106 -
Flags: feedback?(jruderman)
Reporter | ||
Updated•14 years ago
|
Attachment #451106 -
Flags: feedback?(jruderman) → feedback+
Reporter | ||
Comment 3•14 years ago
|
||
Comment on attachment 451106 [details] [diff] [review] reflex WIP This patch fixes the Valgrind warning for me :)
Comment 4•14 years ago
|
||
Please initialize local variables passed into GetSelectState.
Assignee | ||
Comment 5•14 years ago
|
||
This patch makes it clear that we expect these args to be init to 0. Also fixed a typo while I'm here.
Attachment #451106 -
Attachment is obsolete: true
Attachment #451286 -
Flags: review?(surkov.alexander)
Comment 6•14 years ago
|
||
Comment on attachment 451286 [details] [diff] [review] patch > nsIFrame* nsHTMLSelectOptionAccessible::GetBoundsFrame() > { >- PRUint32 state; >+ PRUint32 state = 0; > nsCOMPtr<nsIContent> content = GetSelectState(&state); > > nsIContent* nsHTMLSelectOptionAccessible::GetSelectState(PRUint32* aState, > PRUint32* aExtraState) > { >+ *aState = *aExtraState = 0; this is a crash
Comment 7•14 years ago
|
||
> this is a crash
Why?
Reporter | ||
Comment 8•14 years ago
|
||
It didn't crash for me when I tried it last night.
Comment 9•14 years ago
|
||
because aExtraState is null in the case of GetBoundsFrame().
Comment 10•14 years ago
|
||
(In reply to comment #8) > It didn't crash for me when I tried it last night. probably you didn't trigger this code.
Assignee | ||
Comment 11•14 years ago
|
||
Attachment #451286 -
Attachment is obsolete: true
Attachment #451297 -
Flags: review?(surkov.alexander)
Attachment #451286 -
Flags: review?(surkov.alexander)
Updated•14 years ago
|
Attachment #451297 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 12•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b24c59785359 (Thanks guys)
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•