Bug 12510

Summary: Uninitialized member being used before set
Product: WebKit Reporter: David Carson <dacarson>
Component: Layout and RenderingAssignee: David Carson <dacarson>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch darin: review+

Description David Carson 2007-01-31 11:37:45 PST
In the function:
void Marquee::updateMarqueeStyle()
the value m_totalLoops is being tested before it has been set for the first time.

The test case that can be used to see this is:
LayoutTests/fast/css/MarqueeLayoutTest.html
Comment 1 David Carson 2007-01-31 11:44:31 PST
Call stack:
==14403== Conditional jump or move depends on uninitialised value(s)
==14403==    at 0x7ADCDD4: WebCore::Marquee::updateMarqueeStyle() (RenderLayer.cpp:2115)
==14403==    by 0x7AE0071: WebCore::RenderLayer::styleChanged() (RenderLayer.cpp:1928)
==14403==    by 0x7AB8804: WebCore::RenderBox::setStyle(WebCore::RenderStyle*) (RenderBox.cpp:148)
==14403==    by 0x7AA8A5E: WebCore::RenderBlock::setStyle(WebCore::RenderStyle*) (RenderBlock.cpp:111)
==14403==    by 0x7953F12: WebCore::Node::createRendererIfNeeded() (Node.cpp:912)
==14403==    by 0x7945644: WebCore::Element::attach() (Element.cpp:558)
==14403==    by 0x79F8827: WebCore::HTMLParser::insertNode(WebCore::Node*, bool) (HTMLParser.cpp:288)
==14403==    by 0x79FA3BC: WebCore::HTMLParser::parseToken(WebCore::Token*) (HTMLParser.cpp:220)
Comment 2 David Carson 2007-01-31 11:45:41 PST
Line numbers in call stack out of sync with ToT, but error still exists.
Comment 3 David Carson 2007-01-31 12:24:06 PST
Created attachment 12831 [details]
patch
Comment 4 Darin Adler 2007-01-31 13:09:57 PST
Comment on attachment 12831 [details]
patch

r=me
Comment 5 Sam Weinig 2007-01-31 20:35:35 PST
Landed in r19323.