<?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>157273</bug_id>
          
          <creation_ts>2016-05-02 13:03:20 -0700</creation_ts>
          <short_desc>CRASH when continuing from uncaught exception in inspector</short_desc>
          <delta_ts>2016-05-04 17:27:04 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>156924</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>joepeck</cc>
    
    <cc>mark.lam</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1189482</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-05-02 13:03:20 -0700</bug_when>
    <thetext>* SUMMARY
CRASH when continuing from uncaught exception in inspector

* STEPS TO REPRODUCE
1. Inspect about:blank
2. Show Debugger Tab and enable Break on All Exceptions
3. In quick console, evaluate: throw &quot;Hi&quot;
  =&gt; You should pause
4. Click Continue in the Debugger Sidebar
  =&gt; Crash

* CRASH SNIPPET
Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000005
Exception Note:        EXC_CORPSE_NOTIFY

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.JavaScriptCore      	0x00000001080d6659 llint_slow_path_jtrue + 201 (JSCellInlines.h:251)
1   com.apple.JavaScriptCore      	0x00000001080e41cf llint_entry + 20750
2   com.apple.JavaScriptCore      	0x00000001080deede vmEntryToJavaScript + 299
3   com.apple.JavaScriptCore      	0x0000000107f5469e JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 158 (JITCode.cpp:81)
4   com.apple.JavaScriptCore      	0x0000000107eb3862 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 450 (Interpreter.cpp:1020)
5   com.apple.JavaScriptCore      	0x0000000107abdb27 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) + 71 (MarkedBlock.h:235)
6   com.apple.WebCore             	0x0000000109248bf0 WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) + 96 (JSMainThreadExecState.h:57)
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1189497</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-05-02 13:43:41 -0700</bug_when>
    <thetext>(lldb) btjs
* thread #1: tid = 0x52e179, 0x000000010b0978bc, queue = &apos;com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, addre????
    frame #0: 0x000000010b0978bc JavaScriptCore`JSC::JSCell::isString(this=0x0000000000000000) const + 12 at JSCellInlines.h:160
    frame #1: 0x000000010b147800 JavaScriptCore`JSC::JSCell::toBoolean(this=0x0000000000000000, exec=0x00007fff5830b0e0) const + 32 at JSCellInlines.h:251
    frame #2: 0x000000010b1477b8 JavaScriptCore`JSC::JSValue::toBoolean(this=0x00007fff5830afd0, exec=0x00007fff5830b0e0) const + 200 at JSString.h:759
    frame #3: 0x000000010bb502b1 JavaScriptCore`::llint_slow_path_jtrue(exec=0x00007fff5830b0e0, pc=0x000000011d829448) + 129 at LLIntSlowPaths.cpp:944
    frame #4: 0x000000010bb5c580 evaluateOnCallFrame#CeyOXK [LLInt](Cell[Object ID: 1009]: 0x12113ff80, &lt;JSValue()&gt;, \&quot;{\&quot;ordinal\&quot;:0,\&quot;injectedScriptId\&quot;:1}\&quot;, \&quot;\n//# sourceURL=__WebInspectorInternal__\nthis\&quot;, \&quot;watch-expressions\&quot;, False, Fa
    frame #5: 0x000000010bb5684e JavaScriptCore`llintPCRangeStart + 334
    frame #6: 0x000000010b9650ea JavaScriptCore`JSC::JITCode::execute(this=0x000000011d8204d8, vm=0x0000000120df1000, protoCallFrame=0x00007fff5830b280) + 218 at JITCode.cpp:80
    frame #7: 0x000000010b8f859c JavaScriptCore`JSC::Interpreter::executeCall(this=0x000000011d9f3630, callFrame=0x00000001211d7740, function=0x000000012111fb20, callType=JS, callData=0x00007fff5830b618, thisValue=JSValue at 0x00007fff5830b340, args=0x00007fff5830b5d0) + 1100 at Interpreter.cpp:1020
    frame #8: 0x000000010b1cf63e JavaScriptCore`JSC::call(exec=0x00000001211d7740, functionObject=JSValue at 0x00007fff5830b3c0, callType=JS, callData=0x00007fff5830b618, thisValue=JSValue at 0x00007fff5830b3b8, args=0x00007fff5830b5d0) + 190 at CallData.cpp:40
    frame #9: 0x000000010b1cf6a3 JavaScriptCore`JSC::call(exec=0x00000001211d7740, functionObject=JSValue at 0x00007fff5830b440, callType=JS, callData=0x00007fff5830b618, thisValue=JSValue at 0x00007fff5830b438, args=0x00007fff5830b5d0, returnedException=0x00007fff5830b5f8) + 83 at CallData.cpp:45
    frame #10: 0x000000010f30de9b WebCore`WebCore::JSMainThreadExecState::call(exec=0x00000001211d7740, functionObject=JSValue at 0x00007fff5830b4c0, callType=JS, callData=0x00007fff5830b618, thisValue=JSValue at 0x00007fff5830b4b8, args=0x00007fff5830b5d0, returnedException=0x00007fff5830b5f8) + 107 at JSMainThreadExecState.h:57
    frame #11: 0x000000010f5a4bfd WebCore`WebCore::functionCallHandlerFromAnyThread(exec=0x00000001211d7740, functionObject=JSValue at 0x00007fff5830b540, callType=JS, callData=0x00007fff5830b618, thisValue=JSValue at 0x00007fff5830b538, args=0x00007fff5830b5d0, returnedException=0x00007fff5830b5f8) + 109 at JSMainThreadExecState.cpp:44
...

(lldb) f 2
frame #2: 0x000000010b1477b8 JavaScriptCore`JSC::JSValue::toBoolean(this=0x00007fff5830afd0, exec=0x00007fff5830b0e0) const + 200 at JSString.h:759
   756 	    if (isDouble())
   757 	        return asDouble() &gt; 0.0 || asDouble() &lt; 0.0; // false for NaN
   758 	    if (isCell())
-&gt; 759 	        return asCell()-&gt;toBoolean(exec);
   760 	    return isTrue(); // false, null, and undefined all convert to false.
   761 	}
   762 	

(lldb) p isCell()
(bool) $3 = true

(lldb) p asCell()
(JSC::JSCell *) $4 = 0x0000000000000000</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1189953</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-05-03 19:42:42 -0700</bug_when>
    <thetext>&lt;rdar://problem/26081180&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1190153</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2016-05-04 12:10:44 -0700</bug_when>
    <thetext>Just re-tested this on ToT r200422, and the issue no longer reproduces.  Will close this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1190254</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-05-04 16:00:16 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Just re-tested this on ToT r200422, and the issue no longer reproduces. 
&gt; Will close this issue.

Reopening. We saw this on r200426 and r200429 on my machine. I wasn&apos;t able to reproduce on Mark&apos;s machine though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1190282</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-05-04 17:27:04 -0700</bug_when>
    <thetext>Duplicate.

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

    </bug>

</bugzilla>