<?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>55957</bug_id>
          
          <creation_ts>2011-03-08 12:03:46 -0800</creation_ts>
          <short_desc>function arguments in load_var_args are shifted by one in the interpreter</short_desc>
          <delta_ts>2012-09-25 13:48:48 -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>Other</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Landry Breuil">landry</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>ggaren</cc>
    
    <cc>gustavo</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>364085</commentid>
    <comment_count>0</comment_count>
    <who name="Landry Breuil">landry</who>
    <bug_when>2011-03-08 12:03:46 -0800</bug_when>
    <thetext>As found out by Todd Carson, function arguments are shifted by one on platforms not using JIT, here in our case OpenBSD/mips64el.

In changeset 60392 (http://trac.webkit.org/changeset/60392/trunk/JavaScriptCore/interpreter/Interpreter.cpp),
the following change was made around line 3050 :
-    argCount = (uint32_t)(callFrame-&gt;argumentCount()) - 1; 
+    argCount = (uint32_t)(callFrame-&gt;argumentCount());

reverting it fixes the issue. (see http://www.openbsd.org/cgi-bin/cvsweb/ports/www/webkit/patches/patch-JavaScriptCore_interpreter_Interpreter_cpp?rev=1.1;content-type=text%2Fplain)

However, in webkitgtk the following commit was made :
http://gitorious.org/webkitgtk/stable/commit/f236c158708a2116a799174bd2722fd721e663c4 referencing https://bugs.webkit.org/show_bug.cgi?id=41351 which i can&apos;t access.

So can someone confirm it&apos;s a webkit issue (mistakenly removing the -1 when commiting r60392 ?) or a webkitgtk only issue ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364183</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-08 15:19:43 -0800</bug_when>
    <thetext>The Gtk commit looks quite suspicious indeed. The fix it was merging is r62456, but there are bits of r60392, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369436</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2011-03-17 17:44:59 -0700</bug_when>
    <thetext>Looks like a real bug to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369437</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2011-03-17 17:45:17 -0700</bug_when>
    <thetext>The JIT version of the same opcode uses &quot;- 1&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>369446</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2011-03-17 17:59:24 -0700</bug_when>
    <thetext>Do you have a testcase for this -- as far as i can tell the behaviour is correct (at least in ToT), although there&apos;s an interpreter fix in r60720 which might have been missed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>727926</commentid>
    <comment_count>5</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-09-25 13:48:48 -0700</bug_when>
    <thetext>This code no longer exists in ToT.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>