<?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>119456</bug_id>
          
          <creation_ts>2013-08-02 13:17:40 -0700</creation_ts>
          <short_desc>DFG validation can cause assertion failures due to dumping</short_desc>
          <delta_ts>2013-08-02 14:49:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Mark Hahnenberg">mhahnenberg</reporter>
          <assigned_to name="Mark Hahnenberg">mhahnenberg</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>914247</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2013-08-02 13:17:40 -0700</bug_when>
    <thetext>Looks like we&apos;re encountering a CodeBlock that hasn&apos;t generated a hash() on the main thread, and the compilation thread asserts when trying to dump it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914249</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2013-08-02 13:18:02 -0700</bug_when>
    <thetext>* thread #7: tid = 0x23eab1, 0x000000010068257a JavaScriptCore`WTFCrash + 42 at Assertions.cpp:339, name = &apos;JSC Compilation Thread, stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)
    frame #0: 0x000000010068257a JavaScriptCore`WTFCrash + 42 at Assertions.cpp:339
    frame #1: 0x00000001001b0308 JavaScriptCore`JSC::CodeBlock::hash(this=0x000000010c2449b0) const + 104 at CodeBlock.cpp:89
    frame #2: 0x00000001001b0532 JavaScriptCore`JSC::CodeBlock::dumpAssumingJITType(this=0x000000010c2449b0, out=0x00000001008493a0, jitType=DFGJIT) const + 66 at CodeBlock.cpp:120
    frame #3: 0x0000000100260ee6 JavaScriptCore`JSC::CodeBlockWithJITType::dump(this=0x0000000113960138, out=0x00000001008493a0) const + 38 at CodeBlockWithJITType.h:46
    frame #4: 0x0000000100260ead JavaScriptCore`void WTF::printInternal&lt;JSC::CodeBlockWithJITType&gt;(out=0x00000001008493a0, value=0x0000000113960138) + 29 at PrintStream.h:273
    frame #5: 0x0000000100260e1d JavaScriptCore`void WTF::PrintStream::print&lt;JSC::CodeBlockWithJITType&gt;(this=0x00000001008493a0, value=0x0000000113960138) + 29 at PrintStream.h:58
    frame #6: 0x00000001002d9bd9 JavaScriptCore`void WTF::PrintStream::print&lt;char [9], JSC::CodeBlockWithJITType, char [3]&gt;(this=0x00000001008493a0, value1=0x000000010073ca57, value2=0x0000000113960138, value3=0x000000010072ffb0) [9], JSC::CodeBlockWithJITType const&amp;, char const (&amp;) [3]) + 57 at PrintStream.h:72
    frame #7: 0x00000001002d3e6d JavaScriptCore`void WTF::dataLog&lt;char [9], JSC::CodeBlockWithJITType, char [3]&gt;(value1=0x000000010073ca57, value2=0x0000000113960138, value3=0x000000010072ffb0) [9], JSC::CodeBlockWithJITType const&amp;, char const (&amp;) [3]) + 45 at DataLog.h:58
    frame #8: 0x00000001002d0fd0 JavaScriptCore`JSC::DFG::Graph::dump(this=0x0000000113960968, out=0x00000001008493a0, context=0x0000000113960148) + 128 at DFGGraph.cpp:364
    frame #9: 0x00000001003ac7d8 JavaScriptCore`JSC::DFG::Validate::dumpGraphIfAppropriate(this=0x0000000113960460) + 88 at DFGGraph.h:160
    frame #10: 0x00000001003ac0e0 JavaScriptCore`JSC::DFG::Validate::validate(this=0x0000000113960460) + 4096 at DFGValidate.cpp:167
    frame #11: 0x00000001003ab09b JavaScriptCore`JSC::DFG::validate(graph=0x0000000113960968, graphDumpMode=DumpGraph) + 43 at DFGValidate.cpp:477
    frame #12: 0x000000010031e83e JavaScriptCore`JSC::DFG::Plan::compileInThreadImpl(this=0x000000010c244e30, longLivedState=0x0000000113960e00) + 574 at DFGPlan.cpp:180
    frame #13: 0x000000010031e426 JavaScriptCore`JSC::DFG::Plan::compileInThread(this=0x000000010c244e30, longLivedState=0x0000000113960e00) + 198 at DFGPlan.cpp:113
    frame #14: 0x00000001003be24c JavaScriptCore`JSC::DFG::Worklist::runThread(this=0x000000010c2331a0) + 412 at DFGWorklist.cpp:242
    frame #15: 0x00000001003bd345 JavaScriptCore`JSC::DFG::Worklist::threadFunction(argument=0x000000010c2331a0) + 21 at DFGWorklist.cpp:264
    frame #16: 0x00000001006c8020 JavaScriptCore`WTF::threadEntryPoint(contextData=0x000000010c2333c0) + 144 at Threading.cpp:69
    frame #17: 0x00000001006c89c8 JavaScriptCore`WTF::wtfThreadEntryPoint(param=0x000000010c242550) + 104 at ThreadingPthreads.cpp:195
    frame #18: 0x00007fff9513f8a9 libsystem_pthread.dylib`_pthread_body + 138
    frame #19: 0x00007fff9513f73a libsystem_pthread.dylib`_pthread_start + 137
    frame #20: 0x00007fff95143fd9 libsystem_pthread.dylib`thread_start + 13</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914250</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-08-02 13:23:27 -0700</bug_when>
    <thetext>Boooo!

I think that we should have dumpAssumingJITType() just avoid dumping the hash() if it hasn&apos;t been computed and we&apos;re in the JIT thread.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914255</commentid>
    <comment_count>3</comment_count>
      <attachid>208041</attachid>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2013-08-02 13:36:17 -0700</bug_when>
    <thetext>Created attachment 208041
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914268</commentid>
    <comment_count>4</comment_count>
      <attachid>208041</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-08-02 14:08:20 -0700</bug_when>
    <thetext>Comment on attachment 208041
Patch

r=me

Should we pre-compute the has on the mutator thread, when producing our DFG plan, to make dumping work a little better?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914269</commentid>
    <comment_count>5</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-08-02 14:08:26 -0700</bug_when>
    <thetext>*hash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914284</commentid>
    <comment_count>6</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-08-02 14:34:07 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 208041 [details])
&gt; r=me
&gt; 
&gt; Should we pre-compute the has on the mutator thread, when producing our DFG plan, to make dumping work a little better?

It&apos;s expensive!  I tried that once and it was a slight regression, I think.

Might be worth trying again, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914289</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2013-08-02 14:49:45 -0700</bug_when>
    <thetext>Committed r153671: &lt;http://trac.webkit.org/changeset/153671&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>208041</attachid>
            <date>2013-08-02 13:36:17 -0700</date>
            <delta_ts>2013-08-02 14:08:19 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-119456-20130802134024.patch</filename>
            <type>text/plain</type>
            <size>3107</size>
            <attacher name="Mark Hahnenberg">mhahnenberg</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTUzNjY1KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBA
CisyMDEzLTA4LTAyICBNYXJrIEhhaG5lbmJlcmcgIDxtaGFobmVuYmVyZ0BhcHBsZS5jb20+CisK
KyAgICAgICAgREZHIHZhbGlkYXRpb24gY2FuIGNhdXNlIGFzc2VydGlvbiBmYWlsdXJlcyBkdWUg
dG8gZHVtcGluZworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/
aWQ9MTE5NDU2CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAg
ICAgKiBieXRlY29kZS9Db2RlQmxvY2suY3BwOgorICAgICAgICAoSlNDOjpDb2RlQmxvY2s6Omhh
c0hhc2gpOgorICAgICAgICAoSlNDOjpDb2RlQmxvY2s6OmlzU2FmZVRvQ29tcHV0ZUhhc2gpOgor
ICAgICAgICAoSlNDOjpDb2RlQmxvY2s6Omhhc2gpOgorICAgICAgICAoSlNDOjpDb2RlQmxvY2s6
OmR1bXBBc3N1bWluZ0pJVFR5cGUpOgorICAgICAgICAqIGJ5dGVjb2RlL0NvZGVCbG9jay5oOgor
CiAyMDEzLTA4LTAyICBKdWxpZW4gQnJpYW5jZWF1ICA8amJyaWFuY2VhdUBuZHMuY29tPgogCiAg
ICAgICAgIFJFR1JFU1NJT04oRlRMKTogRml4IG1pcHMgaW1wbGVtZW50YXRpb24gb2YgY3RpVk1U
aHJvd1RyYW1wb2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0gU291cmNlL0phdmFTY3JpcHRDb3JlL2J5dGVjb2RlL0NvZGVCbG9jay5oCShyZXZp
c2lvbiAxNTM2MTIpCisrKyBTb3VyY2UvSmF2YVNjcmlwdENvcmUvYnl0ZWNvZGUvQ29kZUJsb2Nr
LmgJKHdvcmtpbmcgY29weSkKQEAgLTExMSw2ICsxMTEsOCBAQCBwdWJsaWM6CiAKICAgICBDU3Ry
aW5nIGluZmVycmVkTmFtZSgpIGNvbnN0OwogICAgIENvZGVCbG9ja0hhc2ggaGFzaCgpIGNvbnN0
OworICAgIGJvb2wgaGFzSGFzaCgpIGNvbnN0OworICAgIGJvb2wgaXNTYWZlVG9Db21wdXRlSGFz
aCgpIGNvbnN0OwogICAgIENTdHJpbmcgc291cmNlQ29kZUZvclRvb2xzKCkgY29uc3Q7IC8vIE5v
dCBxdWl0ZSB0aGUgYWN0dWFsIHNvdXJjZSB3ZSBwYXJzZWQ7IHRoaXMgd2lsbCBkbyB0aGluZ3Mg
bGlrZSBwcmVmaXggdGhlIHNvdXJjZSBmb3IgYSBmdW5jdGlvbiB3aXRoIGEgcmVpZmllZCBzaWdu
YXR1cmUuCiAgICAgQ1N0cmluZyBzb3VyY2VDb2RlT25PbmVMaW5lKCkgY29uc3Q7IC8vIEFzIHNv
dXJjZUNvZGVGb3JUb29scygpLCBidXQgcmVwbGFjZXMgYWxsIHdoaXRlc3BhY2UgcnVucyB3aXRo
IGEgc2luZ2xlIHNwYWNlLgogICAgIHZvaWQgZHVtcEFzc3VtaW5nSklUVHlwZShQcmludFN0cmVh
bSYsIEpJVENvZGU6OkpJVFR5cGUpIGNvbnN0Owo=
</data>
<flag name="review"
          id="229905"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>