Bug 12510 - Uninitialized member being used before set
Summary: Uninitialized member being used before set
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: David Carson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-31 11:37 PST by David Carson
Modified: 2007-01-31 20:35 PST (History)
0 users

See Also:


Attachments
patch (1.10 KB, patch)
2007-01-31 12:24 PST, David Carson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.