<?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>31089</bug_id>
          
          <creation_ts>2009-11-03 15:19:18 -0800</creation_ts>
          <short_desc>Uninitialized member m_createdByParser in WebCore::ProcessingInstruction</short_desc>
          <delta_ts>2019-02-06 09:02:32 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Dan Kegel">dank</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>160237</commentid>
    <comment_count>0</comment_count>
    <who name="Dan Kegel">dank</who>
    <bug_when>2009-11-03 15:19:18 -0800</bug_when>
    <thetext>Caught by the chromium valgrind layout bot.  Valgrind complains

Warning: set address range perms: large range [0x3901d000, 0x5901d000) (defined)
Conditional jump or move depends on uninitialised value(s)
   at WebCore::Document::addStyleSheetCandidateNode(WebCore::Node*, bool) (Document.cpp:2411)
   by WebCore::ProcessingInstruction::insertedIntoDocument() (ProcessingInstruction.cpp:262)
   by WebCore::dispatchChildInsertionEvents(WebCore::Node*) (ContainerNode.cpp:876)
   ...
 Uninitialised value was created by a heap allocation
   at 0x4C2312C: malloc (vg_replace_malloc.c:195)
   by 0x13B3CDA: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:233)
   by 0x8B6AEE: WTF::FastAllocBase::operator new(unsigned long) (FastAllocBase.h:96)
   by 0xC1528A: WebCore::ProcessingInstruction::create(WebCore::Document*, WebCore::String const&amp;, WebCore::String const&amp;) (ProcessingInstruction.cpp:53)

Looks like somebody forgot to initialize m_createdByParser.  The following patch seems to resolve the problem:

--- WebCore/dom/ProcessingInstruction.cpp    (revision 50454)
+++ WebCore/dom/ProcessingInstruction.cpp    (working copy)
@@ -42,6 +42,7 @@
     , m_cachedSheet(0)
     , m_loading(false)
     , m_alternate(false)
+    , m_createdByParser(false)
 #if ENABLE(XSLT)
     , m_isXSL(false)
 #endif</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160300</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-11-03 20:26:53 -0800</bug_when>
    <thetext>The fix looks right to me. Would you be willing to submit it for review, as described in &lt;http://webkit.org/coding/contributing.html&gt;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160316</commentid>
    <comment_count>2</comment_count>
    <who name="Dan Kegel">dank</who>
    <bug_when>2009-11-03 22:07:38 -0800</bug_when>
    <thetext>Sure, I&apos;ll do that in the morning, thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160448</commentid>
    <comment_count>3</comment_count>
      <attachid>42484</attachid>
    <who name="Dan Kegel">dank</who>
    <bug_when>2009-11-04 08:38:09 -0800</bug_when>
    <thetext>Created attachment 42484
Add mising initializer

Here y&apos;go!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160481</commentid>
    <comment_count>4</comment_count>
      <attachid>42484</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-04 10:09:25 -0800</bug_when>
    <thetext>Comment on attachment 42484
Add mising initializer

You can leave the &quot;Reviewed by NOBODY (OOPS!).&quot; line alone and our scripts will fill it in automatically with Alexey&apos;s full name when landing.  It would be better for you to paste an un-altered NOBODY line, or to correct that to say &quot;Alexey Proskuryakov.&quot; (with a period), before we land this.

LGTM, and someone could land this manually with that fix, but we should get the ChangeLog completely right (either left as NOBODY (OOPS!) or changed to Alexey&apos;s full name with a period) if we want the commit-queue to land this.

Thanks for the patch!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160566</commentid>
    <comment_count>5</comment_count>
      <attachid>42511</attachid>
    <who name="Dan Kegel">dank</who>
    <bug_when>2009-11-04 12:26:59 -0800</bug_when>
    <thetext>Created attachment 42511
2nd draft, with right &apos;reviewed by&apos;

In case it&apos;s useful, here is the patch with the suggested change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160899</commentid>
    <comment_count>6</comment_count>
      <attachid>42511</attachid>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2009-11-05 11:44:22 -0800</bug_when>
    <thetext>Comment on attachment 42511
2nd draft, with right &apos;reviewed by&apos;

r+, cq+, commit bot to substitute the right reviewer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160910</commentid>
    <comment_count>7</comment_count>
      <attachid>42511</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-11-05 11:57:17 -0800</bug_when>
    <thetext>Comment on attachment 42511
2nd draft, with right &apos;reviewed by&apos;

Clearing flags on attachment: 42511

Committed r50571: &lt;http://trac.webkit.org/changeset/50571&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160911</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-11-05 11:57:23 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502789</commentid>
    <comment_count>9</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:02:32 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42484</attachid>
            <date>2009-11-04 08:38:09 -0800</date>
            <delta_ts>2009-11-04 12:26:59 -0800</delta_ts>
            <desc>Add mising initializer</desc>
            <filename>webkit31089.patch</filename>
            <type>text/plain</type>
            <size>1092</size>
            <attacher name="Dan Kegel">dank</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1MDUxMSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTUgQEAKKzIwMDktMTEtMDQgIERhbiBLZWdlbCAgPGRhbmtAY2hyb21pdW0ub3Jn
PgorCisgICAgICAgIFJldmlld2VkIGJ5IGFwQHdlYmtpdC5vcmcKKworICAgICAgICBBZGQgbWlz
c2luZyBpbml0aWFsaXphdGlvbiBmb3IgbV9jcmVhdGVkQnlQYXJzZXIuCisgICAgICAgIGh0dHBz
Oi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0zMTA4OQorCisgICAgICAgIFRlc3Q6
IGZhc3QvZG9tL2JlZm9yZWxvYWQvcGktYmVmb3JlLWxvYWQueGh0bWwgdW5kZXIgdmFsZ3JpbmQK
KworICAgICAgICAqIGRvbS9Qcm9jZXNzaW5nSW5zdHJ1Y3Rpb24uY3BwOgorICAgICAgICAoV2Vi
Q29yZTo6UHJvY2Vzc2luZ0luc3RydWN0aW9uOjpQcm9jZXNzaW5nSW5zdHJ1Y3Rpb24pOgorCiAy
MDA5LTExLTA0ICBDc2FiYSBPc3p0cm9nb27DoWMgIDxvc3N5QHdlYmtpdC5vcmc+CiAKICAgICAg
ICAgVW5yZXZpZXdlZCByb2xsb3V0LgpJbmRleDogV2ViQ29yZS9kb20vUHJvY2Vzc2luZ0luc3Ry
dWN0aW9uLmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJDb3JlL2RvbS9Qcm9jZXNzaW5nSW5zdHJ1Y3Rp
b24uY3BwCShyZXZpc2lvbiA1MDUxMSkKKysrIFdlYkNvcmUvZG9tL1Byb2Nlc3NpbmdJbnN0cnVj
dGlvbi5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTQyLDYgKzQyLDcgQEAgaW5saW5lIFByb2Nlc3Np
bmdJbnN0cnVjdGlvbjo6UHJvY2Vzc2luZwogICAgICwgbV9jYWNoZWRTaGVldCgwKQogICAgICwg
bV9sb2FkaW5nKGZhbHNlKQogICAgICwgbV9hbHRlcm5hdGUoZmFsc2UpCisgICAgLCBtX2NyZWF0
ZWRCeVBhcnNlcihmYWxzZSkKICNpZiBFTkFCTEUoWFNMVCkKICAgICAsIG1faXNYU0woZmFsc2Up
CiAjZW5kaWYK
</data>
<flag name="review"
          id="24016"
          type_id="1"
          status="+"
          setter="eric"
    />
    <flag name="commit-queue"
          id="24029"
          type_id="3"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42511</attachid>
            <date>2009-11-04 12:26:59 -0800</date>
            <delta_ts>2009-11-05 11:57:17 -0800</delta_ts>
            <desc>2nd draft, with right &apos;reviewed by&apos;</desc>
            <filename>webkit31089.patch</filename>
            <type>text/plain</type>
            <size>1091</size>
            <attacher name="Dan Kegel">dank</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG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m9jZXNzaW5nCiAgICAgLCBtX2NhY2hlZFNoZWV0KDApCiAgICAgLCBt
X2xvYWRpbmcoZmFsc2UpCiAgICAgLCBtX2FsdGVybmF0ZShmYWxzZSkKKyAgICAsIG1fY3JlYXRl
ZEJ5UGFyc2VyKGZhbHNlKQogI2lmIEVOQUJMRShYU0xUKQogICAgICwgbV9pc1hTTChmYWxzZSkK
ICNlbmRpZgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>