[Webkit-unassigned] [Bug 16414] New: Valgrind: Conditional jump or move depends on uninitialised value(s)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 12 12:55:57 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=16414
Summary: Valgrind: Conditional jump or move depends on
uninitialised value(s)
Product: WebKit
Version: 525+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: dacarson at gmail.com
Valgrind reports:
==3471== Conditional jump or move depends on uninitialised value(s)
==3471== at 0x1074003D: WebCore::RenderBlock::calcInlinePrefWidths()
(RenderBlock.cpp:3755)
==3471== by 0x107404C7: WebCore::RenderBlock::calcPrefWidths()
(RenderBlock.cpp:3407)
==3471== by 0x10752D58: WebCore::RenderBox::minPrefWidth() const
(RenderBox.cpp:190)
==3471== by 0x107577ED:
WebCore::RenderBox::calcWidthUsing(WebCore::WidthType, int)
(RenderBox.cpp:1220)
The Codes:
RenderBlock.cpp:
// Determine if we have a breakable character. Pass in
// whether or not we should ignore any spaces at the front
// of the string. If those are going to be stripped out,
// then they shouldn't be considered in the breakable char
// check.
bool hasBreakableChar, hasBreak;
int beginMin, endMin;
bool beginWS, endWS;
int beginMax, endMax;
t->trimmedPrefWidths(inlineMax, beginMin, beginWS, endMin,
endWS,
hasBreakableChar, hasBreak, beginMax,
endMax,
childMin, childMax, stripFrontSpaces);
// This text object will not be rendered, but it may still
provide a breaking opportunity.
if (!hasBreak && childMax == 0) {
3755: if (autoWrap && (beginWS || endWS)) {
m_minPrefWidth = max(inlineMin, m_minPrefWidth);
inlineMin = 0;
}
continue;
}
and trimmedPrefWidths.cpp, which is passed references to these bools:
int len = textLength();
if (!len || (stripFrontSpaces && m_text->containsOnlyWhitespace())) {
maxW = 0;
hasBreak = false;
return;
}
minW = m_minWidth;
maxW = m_maxWidth;
beginWS = !stripFrontSpaces && m_hasBeginWS;
endWS = m_hasEndWS;
My guess is that trimmedPrefWidths is returning without setting the
beginWS and endWS bools. These are then used on line 3755. They should
probably be set to something before the call to trimmedPrefWidths.
Setting both to false seems to solve the problem.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list