Bug 31063 - UMR in WebCore::AccessibilityRenderObject::children(); m_childrenDirty uninitialized in constructor
Summary: UMR in WebCore::AccessibilityRenderObject::children(); m_childrenDirty uninit...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 08:59 PST by Darin Fisher (:fishd, Google)
Modified: 2009-11-03 09:27 PST (History)
0 users

See Also:


Attachments
v1 patch (1.14 KB, patch)
2009-11-03 09:16 PST, Darin Fisher (:fishd, Google)
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2009-11-03 08:59:04 PST
From http://crbug.com/26547, Dan Kegel (dank@chromium.org) wrote:

> LayoutTests/accessibility/aria-hidden.html
> (and lots of other tests in that directory)
> show the following valgrind warning:
> 
> Conditional jump or move depends on uninitialised value(s)
>    at WebCore::AccessibilityRenderObject::children()
> (AccessibilityRenderObject.cpp:2549)
>    by AccessibilityUIElement::GetChildAtIndex(unsigned int)
> (accessibility_ui_element.cc:285)
>    ...
>  Uninitialised value was created by a heap allocation
>    at malloc (vg_replace_malloc.c:195)
>    by WTF::fastMalloc(unsigned long) (FastMalloc.cpp:233)
>    by WTF::FastAllocBase::operator new(unsigned long) (FastAllocBase.h:96)
>    by WebCore::AccessibilityRenderObject::create(WebCore::RenderObject*)
> (AccessibilityRenderObject.cpp:101)
>    ...
> 
> Looks like somebody forgot to initialize m_childrenDirty to false
> in the constructor.  The following patch seems to make the
> problem go away:
> 
> --- accessibility/AccessibilityRenderObject.cpp (revision 50258)
> +++ accessibility/AccessibilityRenderObject.cpp (working copy)
> @@ -84,6 +84,7 @@
>      : AccessibilityObject()
>      , m_renderer(renderer)
>      , m_ariaRole(UnknownRole)
> +    , m_childrenDirty(false)
>  {
>      updateAccessibilityRole();
>  #ifndef NDEBUG
Comment 1 Darin Fisher (:fishd, Google) 2009-11-03 09:16:13 PST
Created attachment 42388 [details]
v1 patch
Comment 2 Dimitri Glazkov (Google) 2009-11-03 09:25:21 PST
Comment on attachment 42388 [details]
v1 patch

r=me.
Comment 3 Darin Fisher (:fishd, Google) 2009-11-03 09:27:24 PST
Landed as: http://trac.webkit.org/changeset/50173