<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16414</bug_id>
          
          <creation_ts>2007-12-12 12:55:57 -0800</creation_ts>
          <short_desc>Valgrind: Conditional jump or move depends on uninitialised value(s)</short_desc>
          <delta_ts>2007-12-12 23:50:59 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>13864</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Carson">dacarson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64046</commentid>
    <comment_count>0</comment_count>
    <who name="David Carson">dacarson</who>
    <bug_when>2007-12-12 12:55:57 -0800</bug_when>
    <thetext>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&apos;t be considered in the breakable char
               // check.
               bool hasBreakableChar, hasBreak;
               int beginMin, endMin;
               bool beginWS, endWS;
               int beginMax, endMax;
               t-&gt;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 &amp;&amp; childMax == 0) {
3755:                if (autoWrap &amp;&amp; (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 &amp;&amp; m_text-&gt;containsOnlyWhitespace())) {
       maxW = 0;
       hasBreak = false;
       return;
   }

   minW = m_minWidth;
   maxW = m_maxWidth;
   beginWS = !stripFrontSpaces &amp;&amp; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64076</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2007-12-12 23:50:59 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 13864 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>