<?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>136192</bug_id>
          
          <creation_ts>2014-08-22 21:15:52 -0700</creation_ts>
          <short_desc>After r172867 another crash in in js/dom/line-column-numbers.html</short_desc>
          <delta_ts>2014-08-25 12:33:29 -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>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="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1030885</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-08-22 21:15:52 -0700</bug_when>
    <thetext>After r172867: &lt;http://trac.webkit.org/changeset/172867&gt;, there is a new crash in js/dom/line-column-numbers.html:

Process:         com.apple.WebKit.WebContent.Development [38894]
Path:            /Volumes/VOLUME/*/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.Development.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Development
Identifier:      com.apple.WebKit.WebContent.Development
Version:         538+ (538.45+)
Code Type:       X86-64 (Native)
Parent Process:  ??? [1]
Responsible:     com.apple.WebKit.WebContent.Development [38894]
User ID:         501

Date/Time:       2014-08-22 16:50:17.556 -0700
OS Version:      Mac OS X 10.9.4 (13E28)
Report Version:  11
Anonymous UUID:  615A0368-B225-16FD-FF14-A202D44A3EC4


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

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT

Application Specific Information:
CRASHING TEST:js/dom/line-column-numbers.html

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.JavaScriptCore          0x0000000112cfbea7 JSC::CodeBlock::handlerForBytecodeOffset(unsigned int) + 39 (Vector.h:610)
1   com.apple.JavaScriptCore          0x0000000112f01f5f JSC::UnwindFunctor::operator()(JSC::StackVisitor&amp;) + 111 (Interpreter.cpp:665)
2   com.apple.JavaScriptCore          0x0000000112efef5b JSC::Interpreter::unwind(void*&amp;, JSC::ExecState*&amp;, JSC::JSValue&amp;) + 555 (StackVisitor.h:129)
3   com.apple.JavaScriptCore          0x0000000112f1940b JSC::genericUnwind(JSC::VM*, JSC::ExecState*, JSC::JSValue) + 91 (JITExceptions.cpp:67)
4   com.apple.JavaScriptCore          0x0000000112f38e4c lookupExceptionHandlerFromCallerFrame + 60 (JITOperations.cpp:1854)
5   ???                               0x000046399ca02d83 0 + 77213254823299
6   com.apple.JavaScriptCore          0x00000001130015e9 vmEntryToJavaScript + 326
7   com.apple.JavaScriptCore          0x0000000112f17b73 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 35 (VM.h:373)
8   com.apple.JavaScriptCore          0x0000000112f01096 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 438 (Interpreter.cpp:989)
9   com.apple.JavaScriptCore          0x0000000112ceb9be JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 62 (CallData.cpp:39)
10  com.apple.JavaScriptCore          0x0000000112f90295 JSC::JSObject::defaultValue(JSC::JSObject const*, JSC::ExecState*, JSC::PreferredPrimitiveType) + 1189 (Register.h:116)
11  ???                               0x000046399ca02c8c 0 + 77213254823052
12  com.apple.JavaScriptCore          0x00000001130015e9 vmEntryToJavaScript + 326
13  com.apple.JavaScriptCore          0x0000000112f17b73 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 35 (VM.h:373)
14  com.apple.JavaScriptCore          0x0000000112f01096 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 438 (Interpreter.cpp:989)
15  com.apple.JavaScriptCore          0x0000000112ceb9be JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 62 (CallData.cpp:39)
16  com.apple.JavaScriptCore          0x0000000112f90295 JSC::JSObject::defaultValue(JSC::JSObject const*, JSC::ExecState*, JSC::PreferredPrimitiveType) + 1189 (Register.h:116)
17  ???                               0x000046399ca02c8c 0 + 77213254823052
18  com.apple.JavaScriptCore          0x00000001130015e9 vmEntryToJavaScript + 326
19  com.apple.JavaScriptCore          0x0000000112f17b73 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 35 (VM.h:373)
20  com.apple.JavaScriptCore          0x0000000112f01096 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 438 (Interpreter.cpp:989)
21  com.apple.JavaScriptCore          0x0000000112ceb9be JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 62 (CallData.cpp:39)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1030893</commentid>
    <comment_count>1</comment_count>
      <attachid>237026</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-08-22 21:44:16 -0700</bug_when>
    <thetext>Created attachment 237026
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031169</commentid>
    <comment_count>2</comment_count>
      <attachid>237026</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-08-25 10:46:24 -0700</bug_when>
    <thetext>Comment on attachment 237026
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237026&amp;action=review

&gt; Source/JavaScriptCore/jit/JITOperations.cpp:1847
&gt; -    NativeCallFrameTracer tracer(vm, callerFrame);
&gt; +    NativeCallFrameTracerWithRestore tracer(vm, vmEntryFrame, callerFrame);

Why the need for the restoration of vm-&gt;topVMEntryFrame and vm-&gt;topCallFrame?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031173</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-08-25 10:57:43 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 237026 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=237026&amp;action=review
&gt; 
&gt; &gt; Source/JavaScriptCore/jit/JITOperations.cpp:1847
&gt; &gt; -    NativeCallFrameTracer tracer(vm, callerFrame);
&gt; &gt; +    NativeCallFrameTracerWithRestore tracer(vm, vmEntryFrame, callerFrame);
&gt; 
&gt; Why the need for the restoration of vm-&gt;topVMEntryFrame and vm-&gt;topCallFrame?

We need to use the caller&apos;s CallFrame and VMEntryFrame when calling genericUnwind(). NativeCallFrameTracerWithRestore() does that for us.

In general, NativeCallFrameTracerWithRestore(), restores the values because we may do more processing that requires the current callFrame and vmEntryFrame before we get to the catch handler where we change these to the catch values.  In this particular case, that restoration isn&apos;t currently needed, but we add complexity and possible future confusion if we create another NativeCallFrameTracerXXX() version that doesn&apos;t restore the values.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031174</commentid>
    <comment_count>4</comment_count>
      <attachid>237026</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-08-25 11:04:11 -0700</bug_when>
    <thetext>Comment on attachment 237026
Patch

r=me

The sentinel value option is looking better every day. VM::topVMEntryFrame is turning out to be very subtle, and easy to use wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031176</commentid>
    <comment_count>5</comment_count>
      <attachid>237026</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-08-25 11:06:33 -0700</bug_when>
    <thetext>Comment on attachment 237026
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237026&amp;action=review

&gt;&gt;&gt; Source/JavaScriptCore/jit/JITOperations.cpp:1847
&gt;&gt;&gt; +    NativeCallFrameTracerWithRestore tracer(vm, vmEntryFrame, callerFrame);
&gt;&gt; 
&gt;&gt; Why the need for the restoration of vm-&gt;topVMEntryFrame and vm-&gt;topCallFrame?
&gt; 
&gt; We need to use the caller&apos;s CallFrame and VMEntryFrame when calling genericUnwind(). NativeCallFrameTracerWithRestore() does that for us.
&gt; 
&gt; In general, NativeCallFrameTracerWithRestore(), restores the values because we may do more processing that requires the current callFrame and vmEntryFrame before we get to the catch handler where we change these to the catch values.  In this particular case, that restoration isn&apos;t currently needed, but we add complexity and possible future confusion if we create another NativeCallFrameTracerXXX() version that doesn&apos;t restore the values.

Would you mind adding this comment to the ChangeLog?  I think it’s more informative than the existing one that says &quot;NativeCallFrameTracerWithRestore() so that VM::topVMEntryFrame will be updated before calling genericUnwind().&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031203</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-08-25 12:32:58 -0700</bug_when>
    <thetext>Committed r172932: &lt;http://trac.webkit.org/changeset/172932&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031204</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2014-08-25 12:33:29 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 237026 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=237026&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/JavaScriptCore/jit/JITOperations.cpp:1847
&gt; &gt;&gt;&gt; +    NativeCallFrameTracerWithRestore tracer(vm, vmEntryFrame, callerFrame);
&gt; &gt;&gt; 
&gt; &gt;&gt; Why the need for the restoration of vm-&gt;topVMEntryFrame and vm-&gt;topCallFrame?
&gt; &gt; 
&gt; &gt; We need to use the caller&apos;s CallFrame and VMEntryFrame when calling genericUnwind(). NativeCallFrameTracerWithRestore() does that for us.
&gt; &gt; 
&gt; &gt; In general, NativeCallFrameTracerWithRestore(), restores the values because we may do more processing that requires the current callFrame and vmEntryFrame before we get to the catch handler where we change these to the catch values.  In this particular case, that restoration isn&apos;t currently needed, but we add complexity and possible future confusion if we create another NativeCallFrameTracerXXX() version that doesn&apos;t restore the values.
&gt; 
&gt; Would you mind adding this comment to the ChangeLog?  I think it’s more informative than the existing one that says &quot;NativeCallFrameTracerWithRestore() so that VM::topVMEntryFrame will be updated before calling genericUnwind().&quot;

Added to ChangeLog.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>237026</attachid>
            <date>2014-08-22 21:44:16 -0700</date>
            <delta_ts>2014-08-25 11:06:33 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>136192.patch</filename>
            <type>text/plain</type>
            <size>1452</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTcyODc5KQorKysgU291cm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b3JlL2ppdC9KSVRPcGVyYXRpb25zLmNwcAkocmV2aXNpb24gMTcyODY3
KQorKysgU291cmNlL0phdmFTY3JpcHRDb3JlL2ppdC9KSVRPcGVyYXRpb25zLmNwcAkod29ya2lu
ZyBjb3B5KQpAQCAtMTg0NCw3ICsxODQ0LDcgQEAgdm9pZCBKSVRfT1BFUkFUSU9OIGxvb2t1cEV4
Y2VwdGlvbkhhbmRsZQogICAgIENhbGxGcmFtZSogY2FsbGVyRnJhbWUgPSBleGVjLT5jYWxsZXJG
cmFtZSh2bUVudHJ5RnJhbWUpOwogICAgIEFTU0VSVChjYWxsZXJGcmFtZSk7CiAKLSAgICBOYXRp
dmVDYWxsRnJhbWVUcmFjZXIgdHJhY2VyKHZtLCBjYWxsZXJGcmFtZSk7CisgICAgTmF0aXZlQ2Fs
bEZyYW1lVHJhY2VyV2l0aFJlc3RvcmUgdHJhY2VyKHZtLCB2bUVudHJ5RnJhbWUsIGNhbGxlckZy
YW1lKTsKIAogICAgIEpTVmFsdWUgZXhjZXB0aW9uVmFsdWUgPSB2bS0+ZXhjZXB0aW9uKCk7CiAg
ICAgQVNTRVJUKGV4Y2VwdGlvblZhbHVlKTsK
</data>
<flag name="review"
          id="261734"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>