<?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>143859</bug_id>
          
          <creation_ts>2015-04-16 19:32:08 -0700</creation_ts>
          <short_desc>A odd crash</short_desc>
          <delta_ts>2015-06-08 08:04:16 -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>NEW</bug_status>
          <resolution></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="Peng Xinchao">xinchao.peng</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bshafiei</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>kling</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>xinchao.peng</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1086228</commentid>
    <comment_count>0</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-04-16 19:32:08 -0700</bug_when>
    <thetext>I happend a odd crash  : the Backtrace is below :
WebKitWebProces: unhandled page fault (11) at 0x00000005, code 0x017

gdb) bt
#0 0x9c579d5c in ?? ()
#1 0x4701ea60 in JSC::Watchdog::Scope::~Scope() () from SymbolFiles/mtd_exe/Webkit/libjavascriptcoregtk-3.0.so.0
#2 0x46e7bd00 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) ()
from SymbolFiles/mtd_exe/Webkit/libjavascriptcoregtk-3.0.so.0
#3 0x46f6fbb4 in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) () from SymbolFiles/mtd_exe/Webkit/libjavascriptcoregtk-3.0.so.0
#4 0x44a6cbc0 in WebCore::ScheduledAction::executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue, WebCore::ScriptExecutionContext*) () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#5 0x44a6d320 in WebCore::ScheduledAction::execute(WebCore::Document*) () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#6 0x44a6d430 in WebCore::ScheduledAction::execute(WebCore::ScriptExecutionContext*) () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#7 0x44fbc534 in WebCore::DOMTimer::fired() () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#8 0x459e1c5c in WebCore::ThreadTimers::sharedTimerFiredInternal() () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#9 0x459e1cd8 in WebCore::ThreadTimers::sharedTimerFired() () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#10 0x45fe0cf0 in WebCore::timeout_cb(void*) () from SymbolFiles/mtd_exe/Webkit/libwebkit2gtk-3.0.so.0
#11 0x43f6e8d4 in ?? ()
#12 0x43f6e8d4 in ?? ()

Welcome to guess and analysis  the reason ! Thank you</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086252</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-04-16 22:55:27 -0700</bug_when>
    <thetext>1. Do you have steps to reproduce this?
2. If so, what revision # are you building?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086255</commentid>
    <comment_count>2</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-04-16 23:31:29 -0700</bug_when>
    <thetext>JS source code is that :

setInterval(function() {
     .......
	var $osd = $(&apos;#osd&apos;);
	$osd.show();
     setTimeout(function() {
	 $osd.hide();
       }, 5000);
    ...
     },1000);
my webkit version is webkit-r150045. platform is arm-gtk .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086258</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-04-16 23:55:37 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; JS source code is that :
&gt; 
&gt; setInterval(function() {
&gt;      .......
&gt; 	var $osd = $(&apos;#osd&apos;);
&gt; 	$osd.show();
&gt;      setTimeout(function() {
&gt; 	 $osd.hide();
&gt;        }, 5000);
&gt;     ...
&gt;      },1000);
&gt; my webkit version is webkit-r150045. platform is arm-gtk .

That is a very old version of the code.  Try updating to the tip of tree and see if the issue still manifests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086525</commentid>
    <comment_count>4</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-04-17 22:30:17 -0700</bug_when>
    <thetext>
After running these  JS Source code for  20 minute , Webprocess will coredump :
&lt;script&gt;   
 setInterval(function() {
			
	var d = new Date();
	var time = d.getHours().addNulls() + &quot;:&quot; + d.getMinutes().addNulls();			
	
	var $osd = $(&apos;#osd&apos;);
	$osd.show();
	$osd.find(&quot;.channel_time&quot;).text(time);
	setTimeout(function() {
		$osd.hide();
	}, 5000);
				
    }, 10000);
Number.prototype.addNulls = function () {
    if (this &lt; 10) {
	return &quot;0&quot; + this;
	}
	return this.toString();
   }
&lt;/script&gt;
I find two issue :
1: If disable DFG_JIT , the crash don&apos;t happen .
2. If &quot;var time = d.getHours().addNulls() + &quot;:&quot; + d.getMinutes().addNulls();&quot; is changed to &quot;var time = d.getHours() + &quot;:&quot; + d.getMinutes();&quot;
The crash don&apos;t happen
It looks like  process happen crash when addNulls  is called</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086537</commentid>
    <comment_count>5</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-04-18 03:33:40 -0700</bug_when>
    <thetext>It look like  JSC DFG happen error when running  &quot;return &quot;0&quot; + this;&quot;
Because i found that the crash usually happen when &quot;if (this &lt; 10)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086540</commentid>
    <comment_count>6</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-04-18 04:41:03 -0700</bug_when>
    <thetext>The issue 
void SpeculativeJIT::compile(Node* node)
{

}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086541</commentid>
    <comment_count>7</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-04-18 04:43:54 -0700</bug_when>
    <thetext> 
void SpeculativeJIT::compile(Node* node)
{
  .. .
    case ToThis: {
        ASSERT(node-&gt;child1().useKind() == UntypedUse);
....

}
In here ,  the value of &quot;node-&gt;child1().useKind()&quot; is UntypedUse .
I feel very strange 。
why ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086544</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-04-18 06:57:44 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt;  
&gt; void SpeculativeJIT::compile(Node* node)
&gt; {
&gt;   .. .
&gt;     case ToThis: {
&gt;         ASSERT(node-&gt;child1().useKind() == UntypedUse);
&gt; ....
&gt; 
&gt; }
&gt; In here ,  the value of &quot;node-&gt;child1().useKind()&quot; is UntypedUse .
&gt; I feel very strange 。
&gt; why ?

Again, r150045 is very old (from 2 years ago).  There has been many enhancements and bug fixes since then.   Have you tried the latest revision (e.g. r182982) to see if the issue is still present?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1100309</commentid>
    <comment_count>9</comment_count>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-06-07 23:29:52 -0700</bug_when>
    <thetext>In the newest version (x86_gtk),The crash is still exist .

    case ToThis: {
        printf(&quot; node-&gt;child1().useKind() =%d\n&quot;,node-&gt;child1().useKind());
        ASSERT(node-&gt;child1().useKind() == UntypedUse); ---&gt; crash here

TestCase :
&lt;html&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
	&lt;title&gt;Tutorial Video Widget&lt;/title&gt;
	&lt;script&gt;
function onLoad() {
		
			setInterval(function() {
				var d = new Date();
				var time = d.getHours().addNulls() + &quot;:&quot; + d.getMinutes().addNulls();			
				document.write(&quot;time=&quot;+time);
				document.write(&quot;&lt;br&gt;&quot;);
			}, 1000);

		}
Number.prototype.addNulls = function () {
			if (this &lt; 100) {
				return &quot;0&quot; + this;
			}
			return this.toString();
		}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;onLoad();&quot;&gt;

&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1100312</commentid>
    <comment_count>10</comment_count>
      <attachid>254475</attachid>
    <who name="Peng Xinchao">xinchao.peng</who>
    <bug_when>2015-06-07 23:39:56 -0700</bug_when>
    <thetext>Created attachment 254475
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1100363</commentid>
    <comment_count>11</comment_count>
      <attachid>254475</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-06-08 08:04:16 -0700</bug_when>
    <thetext>Comment on attachment 254475
Patch

This is definitely not the right approach. You&apos;re just turning off ToThis in the DFG and creating a bunch of dead code. Note that the ToThis handling in DFG is designed to work with UntypedUse - so this patch doesn&apos;t make sense.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>254475</attachid>
            <date>2015-06-07 23:39:56 -0700</date>
            <delta_ts>2015-06-08 08:04:16 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-143859-20150608143532.patch</filename>
            <type>text/plain</type>
            <size>2491</size>
            <attacher name="Peng Xinchao">xinchao.peng</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTg0ODQ4CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCBi
NjVjNGE2ZDE2MjNjOTFiYTA5OWM0OTNmNzMzOGY5NjM5MmNhMjQ3Li5kNjgzMzYxZmZlZTBhMzAz
MTQ2MzNkOGY2Yzg5MjQ5YmI5ZTIwNmY0IDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNSBAQAorMjAxNS0wNi0wNyAgUGVuZyBYaW5jaGFvICA8eGluY2hhby5wZW5nQHNhbXN1
bmcuY29tPgorCisgICAgICAgIFdoZW4gREZHIGNvbXBsaWUgVG9UaGlzIGFuZCB1c2VyS2luZCBp
cyBVbnR5cGVkVXNlLCBJdCBpc25vdCBhbGxvd2VkIHRvIGNvbnRpbnVlIHRvIERGRyBjb21wbGll
IGFuZCBpdCBzaG91bGQgZXhpdCBmb3JtIERGRy4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTE0Mzg1OQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9E
WSAoT09QUyEpLgorCisgICAgICAgICogZGZnL0RGR1NwZWN1bGF0aXZlSklUMzJfNjQuY3BwOgor
ICAgICAgICAoSlNDOjpERkc6OlNwZWN1bGF0aXZlSkl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bnR5cGVkVXNlKSB7CisgICAgICAgICAgICB0ZXJtaW5hdGVTcGVjdWxhdGl2ZUV4ZWN1dGlv
bihJbmFkZXF1YXRlQ292ZXJhZ2UsIEpTVmFsdWVSZWdzKCksIDApOworICAgICAgICAgICAgYnJl
YWs7CisgICAgICAgIH0KICAgICAgICAgSlNWYWx1ZU9wZXJhbmQgdGhpc1ZhbHVlKHRoaXMsIG5v
ZGUtPmNoaWxkMSgpKTsKICAgICAgICAgR1BSVGVtcG9yYXJ5IHRlbXAodGhpcyk7CiAgICAgICAg
IEdQUlJlZyB0aGlzVmFsdWVHUFIgPSB0aGlzVmFsdWUuZ3ByKCk7Cg==
</data>
<flag name="review"
          id="279459"
          type_id="1"
          status="-"
          setter="fpizlo"
    />
          </attachment>
      

    </bug>

</bugzilla>