<?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>122980</bug_id>
          
          <creation_ts>2013-10-17 11:14:26 -0700</creation_ts>
          <short_desc>Fix callOperation for operationThrow to handle Win X86_64 calling convention</short_desc>
          <delta_ts>2013-10-17 20:12:36 -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>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>122982</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>121756</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>alex.christensen</cc>
    
    <cc>ggaren</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>940856</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-10-17 11:14:26 -0700</bug_when>
    <thetext>The callOperation() near line 295 in JITInlines.h needs to be updated for the Win X86_64 calling convention.  When a function returns a POD that doesn&apos;t fit in one register, the caller needs to allocate space for the result and pass it as the first argument.  The code and comments added with change set r157581: &lt;http://trac.webkit.org/changeset/157581&gt; are:

    // Need to make space on stack for return value, use that address as first arg (in register),
    // move callFrameRegister to second argument register and push the passed arg1.
    updateTopCallFrame();
    MacroAssembler::Call call = appendCall(operation);
    // These may not be pops:
    // pop(regT0); // Restore arg1 slot
    // pop(regT0); // Get handler&apos;s call frame
    // pop(regT1); // Get handler&apos;s address
    return call;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941047</commentid>
    <comment_count>1</comment_count>
    <who name="Alex Christensen">alex.christensen</who>
    <bug_when>2013-10-17 16:48:45 -0700</bug_when>
    <thetext>That code is inside of #if USE(JSVALUE64), which I don&apos;t use.  I&apos;m not sure what the state of Apple&apos;s Win64 build is, but this change will not affect the crashes I was seeing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941071</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-10-17 18:36:03 -0700</bug_when>
    <thetext>This issue is addressed with the fix for https://bugs.webkit.org/show_bug.cgi?id=122982.

*** This bug has been marked as a duplicate of bug 122982 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941073</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2013-10-17 18:37:00 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; That code is inside of #if USE(JSVALUE64), which I don&apos;t use.  I&apos;m not sure what the state of Apple&apos;s Win64 build is, but this change will not affect the crashes I was seeing.

WinCairo on X86_64 doesn&apos;t use JSVALUE64? JSVALUE64 is a requirement for 64bit platforms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941087</commentid>
    <comment_count>4</comment_count>
    <who name="Alex Christensen">alex.christensen</who>
    <bug_when>2013-10-17 20:12:36 -0700</bug_when>
    <thetext>&gt; WinCairo on X86_64 doesn&apos;t use JSVALUE64? JSVALUE64 is a requirement for 64bit platforms.

Once again, Geoff is right.  I got JSVALUE64 (which is used) mixed up with JSVALUE32_64 (which is not used).  Ignore my earlier comment.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>